Home > Articles > Operating Systems, Server > Solaris

This chapter is from the book

5.4 Oracle Solaris as an Oracle VM VirtualBox Guest

Solaris 10 is a fully supported guest OS for VirtualBox. A full complement of Guest Additions is available, including seamless mode and accelerated 3D graphics. For optimal performance, the following settings are recommended for a Solaris guest:

  • Boot disk: SATA (one of the first four ports with IDE compatibility mode enabled)
  • CD-ROM: Master device on the second IDE channel (the default)
  • Network: Intel Pro/1000MT Desktop
  • Hardware acceleration: Enabled if supported by the host
  • Nested page tables: Enabled if supported by the host
  • PAE/NX: Enabled

As with all supported guests, the Guest Additions are provided on a CD-ROM image file that is automatically installed with VirtualBox. The Oracle Solaris Guest Additions are included in a single SVR4 data stream package named VBoxSolarisAdditions.pkg. As with the host packages, if a previous release of the Guest Additions is installed, it must be removed before a new version can be installed. Rebooting the guest after the new additions are installed is strongly recommended; this step is not required when the Guest Additions are first installed.

The following command installs the Guest Additions on a new Solaris guest:

# pkgadd -d /cdrom/cdrom0/VBoxSolarisAdditions.pkg all

Once the Guest Additions are installed, all of the ancillary features—such as the ability to resize the guest display automatically and implement the shared clipboard—should be available for use.

One special feature of the Guest Additions is shared folders. It allows the guest to share files with other guests and the host via the host's native file system. In Oracle Solaris, the shared folders are made available as a vboxfs file system. Shared folders are defined per guest in the VirtualBox GUI or via the VBoxManage command line. In the following example, the directory /export/iso on the host is shared as /iso with a Solaris 10 guest. On the host platform, issue the following command to create the shared folder. In this example, the guest is named Solaris10.

Host% VBoxManage sharefolder add Solaris10 --name iso \
      --hostpath /export/iso

Now the guest can mount and access the file system, as in the following example:

# mkdir /iso
# mount -F vboxfs -o uid=1234,gid=5678 iso /iso
# ls -la /iso

total 19720801

drwxrwxrwx   1 1234     5678       4096 Dec  1 16:02 .

drwxr-xr-x  34 root     root          35 Feb 12 20:51 ..
drwxrwxrwx   1 1234     5678       4096 Sep  9 08:43 centos
drwxrwxrwx   1 1234     5678       4096 Aug 27 13:22 fedora
drwxrwxrwx   1 1234     5678       8192 Feb  1 12:20 opensolaris
drwxrwxrwx   1 1234     5678       4096 Oct 25 10:29 oracle
drwxrwxrwx   1 1234     5678       8192 Aug 31 13:44 redhat
drwxrwxrwx   1 1234     5678       4096 Sep  9 08:56 rescue
drwxrwxrwx   1 1234     5678       4096 Feb  3 16:12 s10
drwxrwxrwx   1 1234     5678       8192 Feb  3 21:57 s11
drwxrwxrwx   1 1234     5678          0 Aug 31 13:31 suse
drwxrwxrwx   1 1234     5678          0 Aug  9  2009 ubuntu
drwxrwxrwx   1 1234     5678       8192 Feb 13 00:38 windows

Because the file permission and ownership abstractions may not translate directly between the host operating system and that of the guest, the user starting the virtual machine in the host must have appropriate access to the files being shared. Inside the guest, the owner and group are set by mount options—in this case, user 1234 and group 5678.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.