2017-02-26 21:30:46 +00:00
+++
title = "VirtualBox"
2018-04-20 12:50:56 +00:00
lastmod = "2018-04-19T19:30:00+02:00"
2017-02-26 21:30:46 +00:00
+++
2017-02-03 08:38:34 +00:00
# VirtualBox
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
[VirtualBox ](https://virtualbox.org ) is an x86 and x86_64 virtualization software package developed by Oracle.
2017-01-05 02:56:10 +00:00
2017-08-16 16:22:47 +00:00
2018-04-20 12:50:56 +00:00
## Before you start
2017-08-16 16:22:47 +00:00
2018-04-20 12:50:56 +00:00
This section applies to new installations for both **Host** and **Guest** .
2017-11-08 18:33:36 +00:00
2018-04-20 12:50:56 +00:00
### Remove prior installation
2017-11-08 18:33:36 +00:00
2018-04-20 12:50:56 +00:00
It is important to uninstall any version of VirtualBox (or VirtualBox Guest Additions) that **was not** installed from the Software Center or there will be conflicts that will prevent the application to work.
This can usually be done by executing the following command from a terminal:
2017-11-08 18:33:36 +00:00
2017-12-14 22:00:12 +00:00
``` bash
sudo /opt/VirtualBox/uninstall.sh
```
2018-04-20 12:50:56 +00:00
### Update your system
2017-11-08 18:33:36 +00:00
2018-04-20 12:50:56 +00:00
Ensure your system is up-to-date. This is very important because VirtualBox installs some kernel modules and the application will not work if your kernel is outdated.
2017-08-16 16:22:47 +00:00
``` bash
2017-11-08 18:33:36 +00:00
sudo eopkg upgrade
2017-08-16 16:22:47 +00:00
```
2018-04-20 12:50:56 +00:00
### Determine which kernel you are using
2017-11-08 18:33:36 +00:00
2018-04-20 12:50:56 +00:00
Solus support both a `current` and `lts` kernel. It is important to install the version that corresponds to your kernel.
If you aren't sure which kernel you are running, run the following in terminal:
2017-08-16 16:22:47 +00:00
``` bash
2018-04-20 12:50:56 +00:00
uname -r
2017-08-16 16:22:47 +00:00
```
2018-04-20 12:50:56 +00:00
You will either have a `.current` or `.lts` suffix. Examples: `4.15.15-63.current` or `4.9.92-85.lts`
2017-08-16 16:22:47 +00:00
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
## Solus as Host
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
VirtualBox is available in the Software Center, select the package that matches your kernel.
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
virtualbox | virtualbox-current
----- | -----
VirtualBox Host modules for the **linux-lts** kernel | VirtualBox Host modules for the **linux-current** kernel
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
You **must** reboot your computer before running VirtualBox for the first time.
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
### Troubleshooting
2017-09-10 18:59:55 +00:00
2018-04-20 12:50:56 +00:00
{{< altimg " vbox-kernel . png " " help-center / software / virtualbox / " > }}
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
The Error `Kernel driver not installed (rc=-1908)` may occur if
2017-01-05 02:56:10 +00:00
2018-04-20 12:50:56 +00:00
- The computer was not restarted before launching VirtualBox for the first time
- The computer is not booted on the latest kernel. Make sure to apply the updates from the Software Center and restart your machine.
- The wrong VirtualBox package was installed. Please check the instructions just above to install the correct package for your kernel.
- VirtualBox was manually installed and it conflicts with the version installed from the Solus Repository.
2017-03-08 19:37:31 +00:00
2017-09-10 18:59:55 +00:00
2018-04-20 12:50:56 +00:00
## Solus as Guest
VirtualBox Guest Additions are available in the Software Center, select the package that matches kernel version on the Solus virtual machine.
2017-09-10 18:59:55 +00:00
2018-04-20 12:50:56 +00:00
virtualbox-guest | virtualbox-guest-current
----- | -----
VirtualBox Guest modules for the **linux-lts** kernel | VirtualBox Guest modules for the **linux-current** kernel
2017-09-10 18:59:55 +00:00
2018-04-20 12:50:56 +00:00
You **must** reboot your virtual machine to load the newly installed modules
2017-09-10 18:59:55 +00:00
2018-04-20 12:50:56 +00:00
## Extra configuration
2017-09-10 18:59:55 +00:00
#### USB Controller
2018-04-20 12:50:56 +00:00
If you want to use USB 2.0 or 3.0 in your virtual machine (and your hardware supports it), you have to install the [extension pack ](https://www.virtualbox.org/manual/ch01.html#intro-installing ).
2017-09-10 18:59:55 +00:00
2017-11-08 18:33:36 +00:00
Note: Access to USB is granted by the user group `vboxusers` on the **Host** operating system. You can add yourself to this group with the following command
2017-03-08 19:37:31 +00:00
``` bash
2017-09-10 18:59:55 +00:00
sudo usermod -aG vboxusers `whoami`
2017-03-08 19:37:31 +00:00
```
2017-09-10 18:59:55 +00:00
#### Shared Folders
2018-04-20 12:50:56 +00:00
Share folders let you access files from the host system from within a guest machine.
**Note:** auto-mounted shared folders are mounted into the `/media` directory, along with the prefix `sf_` . For example, the shared folder `myfiles` would be mounted to `/media/sf_myfiles` .
2017-09-10 18:59:55 +00:00
2018-04-20 12:50:56 +00:00
Access to the shared folders is only granted to the user group `vboxsf` on the **Guest** operating system.
2017-09-10 18:59:55 +00:00
2017-11-08 18:33:36 +00:00
Execute these commands to set the permissions and add yourself to the group
2017-03-08 19:37:31 +00:00
``` bash
2017-09-10 18:59:55 +00:00
sudo usermod -aG vboxsf `whoami`
2017-03-08 19:37:31 +00:00
```