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 version of Oracle VM VirtualBox. The installation must be performed as root and from the global zone. This is because 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.

To start installation, run the following commands:

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

The Oracle VM VirtualBox kernel package is 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.


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 either by using the desktop user and group tools or by running the following command as root:

usermod -G vboxuser username

Note that adding an active user to the vboxuser group will require the user to log out and then log 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 an 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.

2.4.5. Unattended Installation

To perform a non-interactive installation of Oracle VM VirtualBox there is a response file named autoresponse. The installer uses this for responses to inputs, rather than prompting the user.

Extract the tar.gz package as described in Section 2.4.1, “Performing the Installation”. 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>add device
zonecfg:vboxzone:device>set match=/dev/vboxdrvu

On Oracle Solaris 11 or later, you may also add a device for /dev/vboxusbmon, similar to that shown above.

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

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