Configuring a Non-Global Zone for Running <ph conkeyref="vbox-conkeyref-phrases/product-name"/>

After installing in the global zone (see for the installation instructions) the first step required to run in a non-global zone is to modify the zone's configuration to be able to access the 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-gloabl zone where you plan to run .

Use zonecfg(8) to add the device resource and the match property for each 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 does not 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 reboot
                  

for the changes to take effect. You will then be able to run from /opt/VirtualBox within the configured non-global zone.