VirtualBox: Difference between revisions
Brodriguez (talk | contribs) (Update ubuntu section) |
Brodriguez (talk | contribs) (Document handling for more possible problems) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[https://www.virtualbox.org/ VirtualBox] is a free means to create and manage VirtualMachines.<br> | [https://www.virtualbox.org/ VirtualBox] is a free means to create and manage VirtualMachines.<br> | ||
It's compatible with Windows, Linux, and Mac systems. | It's compatible with Windows, Linux, and Mac systems. | ||
== Installing VirtualBox == | == Installing VirtualBox == | ||
Line 7: | Line 8: | ||
=== Ubuntu === | === Ubuntu === | ||
Ubuntu comes with a repository of VirtualBox included, but the version it pulls is generally fairly outdated. It can be installed with: | |||
* <code>sudo apt install virtualbox virtualbox-ext-pack</code> | * <code>sudo apt install virtualbox virtualbox-ext-pack</code> | ||
To use a repository that uses current versions of VirtualBox, run the commands: | |||
* <code>wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -</code> | |||
* <code>sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"</code> | |||
* <code>sudo apt update && sudo apt install virtualbox-<version></code> | |||
** Where '''<version>''' is the latest version of VirtualBox available. You should be able to just tab complete in the terminal to see versions available. | |||
=== Manjaro === | |||
Either use the standard '''software updater''' GUI and find the {{ ic |virtualbox}} package, or run the terminal command: | |||
sudo pacman -Syu virtualbox | |||
When prompted for kernel modules, open up a new terminal and run: | |||
uname -r | |||
The result should be something like 4.x.x or 5.x.x or similar. That indicates which kernel module you should select. | |||
== Using VirtualBox == | == Using VirtualBox == | ||
Line 25: | Line 42: | ||
** <code>sudo apt install build-essential dkms</code> | ** <code>sudo apt install build-essential dkms</code> | ||
* Add the logged in user to the VirtualBox group: | * Add the logged in user to the VirtualBox group: | ||
** <code>sudo usermod -a -G vboxsf | ** <code>sudo usermod -a -G vboxsf <user_name></code> | ||
==== Sidenote: Unattended Upgrades ==== | |||
For any Ubuntu VMs, it's probably worth disabling "unattended upgrades". You should be regularly running manual updates anyways. See [[Apt-Get#Automatic Updates & Notifications| Apt-Get Automatic Updates & Notifications]]. | |||
=== Manjaro Quirks === | |||
To run Manjaro in a VM, you will likely have to change the default '''Graphics Controller''': | |||
* Before first time launch, open up the VM's settings. | |||
* Go to the '''Display''' tab in settings. | |||
* Click the '''Graphics Controller''' box and switch to {{ ic |VBoxSVGA}}. | |||
* The VM should now be able to launch properly. | |||
== Possible Errors == | |||
=== Ubuntu VM Going to Black Screen During Install or Updates === | |||
This is most likely a video memory issue. Close the VM, go into its settings, and increase video memory to maximum possible. This should hopefully fix it. | |||
=== Updated Ubuntu and Now it's Giving Nonsensical "Wrong Kernel" Errors === | |||
Try the steps at https://askubuntu.com/a/1131716 | |||
=== Unable to Select a Disk Image for New VMs === | |||
As of writing this, some versions of VirtualBox seem to have a bug where the software will seemingly install fine, but when you create and launch a new VM, you're unable to select a disk image for the ISO. This occurs when you're prompted to select a disk image (via the '''OOptical Disk Selector''' window. But then when you hit the '''Add''' button, nothing occurs. | |||
To get around this: | |||
* Shut down the VM | |||
* Go to the VM's settings | |||
* Go to the '''Storage''' tab of settings. | |||
* Select the "Empty" disk under the IDE Controller. | |||
* On the right, there should be an image of a CD next to the '''Optical Drive''' box. | |||
* From here, you should be able to select an ISO properly, even if you could not when the VM was launched. | |||
* Choose your desired ISO and launch your VM once more. |
Latest revision as of 01:49, 25 October 2020
VirtualBox is a free means to create and manage VirtualMachines.
It's compatible with Windows, Linux, and Mac systems.
Installing VirtualBox
Windows
Follow the steps on the VirtualBox Downloads page.
Ubuntu
Ubuntu comes with a repository of VirtualBox included, but the version it pulls is generally fairly outdated. It can be installed with:
sudo apt install virtualbox virtualbox-ext-pack
To use a repository that uses current versions of VirtualBox, run the commands:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
sudo apt update && sudo apt install virtualbox-<version>
- Where <version> is the latest version of VirtualBox available. You should be able to just tab complete in the terminal to see versions available.
Manjaro
Either use the standard software updater GUI and find the virtualbox
package, or run the terminal command:
sudo pacman -Syu virtualbox
When prompted for kernel modules, open up a new terminal and run:
uname -r
The result should be something like 4.x.x or 5.x.x or similar. That indicates which kernel module you should select.
Using VirtualBox
- Download the iso for your desired operating system.
- Setup a new VM and run through the standard OS setup process.
- Remember to proper memory, processors, and vram, otherwise it may run poorly/incorrectly.
- For example, VMs running Ubuntu18 may black screen if only allocated the default 16 MB vram.
- Once installed, launch the VM and:
- Install the Guest Editions CD through the menu with Devices > Insert Guest Editions CD Image...
- Run normal system updates on your VM.
- Finally, restart the VM to be ready for normal use.
Ubuntu Quirks
To make use of Guest Editions in ubuntu a few additional steps might be needed.
- Install additional apt dependencies on the VM:
sudo apt install build-essential dkms
- Add the logged in user to the VirtualBox group:
sudo usermod -a -G vboxsf <user_name>
Sidenote: Unattended Upgrades
For any Ubuntu VMs, it's probably worth disabling "unattended upgrades". You should be regularly running manual updates anyways. See Apt-Get Automatic Updates & Notifications.
Manjaro Quirks
To run Manjaro in a VM, you will likely have to change the default Graphics Controller:
- Before first time launch, open up the VM's settings.
- Go to the Display tab in settings.
- Click the Graphics Controller box and switch to
VBoxSVGA
. - The VM should now be able to launch properly.
Possible Errors
Ubuntu VM Going to Black Screen During Install or Updates
This is most likely a video memory issue. Close the VM, go into its settings, and increase video memory to maximum possible. This should hopefully fix it.
Updated Ubuntu and Now it's Giving Nonsensical "Wrong Kernel" Errors
Try the steps at https://askubuntu.com/a/1131716
Unable to Select a Disk Image for New VMs
As of writing this, some versions of VirtualBox seem to have a bug where the software will seemingly install fine, but when you create and launch a new VM, you're unable to select a disk image for the ISO. This occurs when you're prompted to select a disk image (via the OOptical Disk Selector window. But then when you hit the Add button, nothing occurs.
To get around this:
- Shut down the VM
- Go to the VM's settings
- Go to the Storage tab of settings.
- Select the "Empty" disk under the IDE Controller.
- On the right, there should be an image of a CD next to the Optical Drive box.
- From here, you should be able to select an ISO properly, even if you could not when the VM was launched.
- Choose your desired ISO and launch your VM once more.