2.4. Installing on Oracle Solaris Hosts

For the specific versions of Oracle Solaris that are supported as host operating systems, see Section 1.4, “Supported Host Operating Systems”.

If you have a previously installed instance of Oracle VM VirtualBox on your Oracle Solaris host, please uninstall it first before installing a new instance. See Section 2.4.4, “Uninstallation” for uninstall instructions.

2.4.1. Performing the Installation

Oracle VM VirtualBox is available as a standard Oracle Solaris package. Download the Oracle VM VirtualBox SunOS package which includes the 64-bit versions of Oracle VM VirtualBox. The installation must be performed as root and from the global zone as the Oracle VM VirtualBox installer loads kernel drivers which cannot be done from non-global zones. To verify which zone you are currently in, execute the zonename command. Execute the following commands:

gunzip -cd VirtualBox-version-number-SunOS.tar.gz | tar xvf -

The Oracle VM VirtualBox kernel package is no longer a separate package and has been integrated into the main package. Install the Oracle VM VirtualBox package as follows:

pkgadd -d VirtualBox-version-number-SunOS.pkg

The installer will then prompt you to enter the package you wish to install. Choose 1 or all and proceed. Next the installer will ask you if you want to allow the postinstall script to be executed. Choose y and proceed, as it is essential to execute this script which installs the Oracle VM VirtualBox kernel module. Following this confirmation the installer will install Oracle VM VirtualBox and execute the postinstall setup script.

Once the postinstall script has been executed your installation is now complete. You may now safely delete the uncompressed package and autoresponse files from your system. Oracle VM VirtualBox is installed in /opt/VirtualBox.

Note

If you need to use Oracle VM VirtualBox from non-global zones, see Section 2.4.6, “Configuring a Zone for Running Oracle VM VirtualBox”.

2.4.2. The vboxuser Group

The installer creates the system user group vboxuser during installation for Oracle Solaris hosts that support the USB features required by Oracle VM VirtualBox. Any system user who is going to use USB devices from Oracle VM VirtualBox guests must be a member of this group. A user can be made a member of this group through the GUI user/group management or at the command line by executing as root:

usermod -G vboxuser username

Note that adding an active user to that group will require that user to log out and back in again. This should be done manually after successful installation of the package.

2.4.3. Starting Oracle VM VirtualBox on Oracle Solaris

The easiest way to start a Oracle VM VirtualBox program is by running the program of your choice (VirtualBox, VBoxManage, or VBoxHeadless) from a terminal. These are symbolic links to VBox.sh that start the required program for you.

Alternatively, you can directly invoke the required programs from /opt/VirtualBox. Using the links provided is easier as you do not have to enter the full path.

You can configure some elements of the VirtualBox Qt GUI, such as fonts and colours, by running VBoxQtconfig from the terminal.

2.4.4. Uninstallation

Uninstallation of Oracle VM VirtualBox on Oracle Solaris requires root permissions. To perform the uninstallation, start a root terminal session and run the following command:

pkgrm SUNWvbox

After confirmation, this will remove Oracle VM VirtualBox from your system.

If you are uninstalling Oracle VM VirtualBox version 3.0 or lower, you need to remove the Oracle VM VirtualBox kernel interface package, as follows:

pkgrm SUNWvboxkern

2.4.5. Unattended Installation

To perform a non-interactive installation of Oracle VM VirtualBox there is a response file named autoresponse, that the installer will use for responses to inputs rather than ask them from you.

Extract the tar.gz package as described in the normal installation instructions. Then open a root terminal session and run the following command:

pkgadd -d VirtualBox-version-number-SunOS-x86 -n -a autoresponse SUNWvbox

To perform a non-interactive uninstallation, open a root terminal session and run the following command:

pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox

2.4.6. Configuring a Zone for Running Oracle VM VirtualBox

Assuming that Oracle VM VirtualBox has already been installed into your zone, you need to give the zone access to Oracle VM VirtualBox's device node. This is done by performing the following steps. Start a root terminal and run the following command:

zonecfg -z vboxzone

Replace vboxzone with the name of the zone where you intend to run Oracle VM VirtualBox.

Use zonecfg to add the device resource and match properties to the zone, as follows:

zonecfg:vboxzone>add device
zonecfg:vboxzone:device>set match=/dev/vboxdrv
zonecfg:vboxzone:device>end
zonecfg:vboxzone>add device
zonecfg:vboxzone:device>set match=/dev/vboxdrvu
zonecfg:vboxzone:device>end
zonecfg:vboxzone>exit

If you are running Oracle VM VirtualBox 2.2.0 or above on Oracle Solaris 11 or above, you may also add a device for /dev/vboxusbmon, similar to that shown above. This does not apply to Oracle Solaris 10 hosts, due to lack of USB support.

If you are not using sparse root zones, you will need to loopback mount /opt/VirtualBox from the global zone into the non-global zone at the same path. This is specified below using the dir attribute and the special attribute. For example:

zonecfg:vboxzone>add fs
zonecfg:vboxzone:device>set dir=/opt/VirtualBox
zonecfg:vboxzone:device>set special=/opt/VirtualBox
zonecfg:vboxzone:device>set type=lofs
zonecfg:vboxzone:device>end
zonecfg:vboxzone>exit

Reboot the zone using zoneadm and you should be able to run Oracle VM VirtualBox from within the configured zone.