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.
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.pkgThe 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 Non-Global Zone for Running Oracle VM VirtualBox”.
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.
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.
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.
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 SUNWvboxTo perform a non-interactive uninstallation, open a root terminal session and run the following command:
pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox
After installing Oracle VM VirtualBox in the global zone (see Section 2.4, “Installing on Oracle Solaris Hosts” for the installation instructions) the first step required to run Oracle VM VirtualBox in a non-global zone is to modify the zone's configuration to be able to access the Oracle VM VirtualBox device nodes located in the global zone. This is done by performing the following steps as a zone administrator in the global zone.
global$ zonecfg -z vboxzone
Replace vboxzone with the name of the
non-global zone where you plan to run Oracle VM VirtualBox.
Use zonecfg(8) to add the
device resource and the match
property for each Oracle VM VirtualBox device node in the global zone to
the non-global 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
On Oracle Solaris 11 if you plan to use VMs configured to use a USB device, e.g. a USB
pointing device or a USB pass-through device, you should also pass through the
/dev/vboxusbmon device using the steps above.
Oracle Solaris 11 doesn't support sparse root zones so you will need to
loopback mount /opt/VirtualBox from the
global zone into the non-global zone at the same path. This is
done using zonecfg(8) to set the dir
attribute and the special attribute for this directory.
For example:
zonecfg:vboxzone> add fs zonecfg:vboxzone:fs> set dir=/opt/VirtualBox zonecfg:vboxzone:fs> set special=/opt/VirtualBox zonecfg:vboxzone:fs> set type=lofs zonecfg:vboxzone:fs> add options [readonly] zonecfg:vboxzone:fs> end zonecfg:vboxzone>exit
After making the above changes using zonecfg(8), reboot the zone using zoneadm(8) as follows:
global$ zoneadm -z vboxzone rebootfor the changes to take effect. You will then be able to run Oracle VM VirtualBox from /opt/VirtualBox within the configured non-global zone.