VirtualBox on OpenSolaris

VirtualBox to become part of Sun's growing Open Source family.

VirtualBox is an open source x86 hypervisor that runs as an application on many host operating systems. It works on Intel or AMD based computers and does not require any H/W virtualization support. It features an easy to use graphical interface and supports virtual machines that have a single 32 bit processor. Most of the essential support needed to use VirtualBox on OpenSolaris is complete and an installable beta version is now available on the website. Tim Marsland has written more about OpenSolaris and VirtualBox on his blog.

For something interesting, I decided this blog entry will deal with how to how to download the VirtualBox Open Source Edition source , then configure, build and run it on recent versions of OpenSolaris. Virtual Box OSE is mostly the same as the binary version, but lacks a few of the advanced features.

I use OpenSolaris on my laptops and workstations and having VirtualBox on all of them is great. I can fire up VirtualBox when I need to access the occasional application that requires Windows. It's also been useful for testing things on different Operating Systems or just multiple versions of Operating Systems.
This is a shot of my OpenSolaris workstation running two VirtualBox guests. Click on it to see the full image. One guest is Microsoft Windows XP, the other is another instance of OpenSolaris.


The following instructions were derived on Solaris Express Community Edition based on build 79 running on Intel or AMD based machines in 64 bit mode. 32 bit works too, but you'll have to change the directions in some places. I've replicated the steps on a few later Solaris builds without any problems. Also, VirtualBox requires a system running using the i86pc platform, uname -i,so it doesn't work when a machine is booted under xVM.

libqt version 3

VirtualBox uses libqt version 3 for its GUI. OpenSolaris doesn't include this library, so you either have to find packages from some download site or follow these instructions to build and install libqt yourself. The instructions configure libqt for 64 bit applications and installs it under /opt/qt64.

joe% wget
joe% bzcat qt-x11-free-3.3.8.tar.bz2  | tar xvf -
joe% cd qt-x11-free-3.3.8
joe% ./configure -v -platform solaris-g++-64 -thread -shared -stl -largefile \\
-tablet -sm -disable-sql -qt-imgfmt-jpeg -qt-imgfmt-png -qt-imgfmt-mng \\
-qt-libjpeg -qt-libpng -qt-libmng -qt-zlib \\
-prefix /opt/qt64 \\
-I/usr/include \\
-I/usr/X11/include \\
-I/usr/X11/share/include \\
joe% setenv QTDIR `pwd` joe% setenv PATH .:${QTDIR}/bin:${PATH} joe% setenv LD_LIBRARY_PATH .:${QTDIR}/lib:${LD_LIBRARY_PATH} joe% gmake ...

The make step takes a little while, but not too long. After it finishes, you'll need to do the install step as root.

joe% su
root% gmake install


Here are instructions for building VirtualBox from source. Note they were accurate one one point in time, but will get out of date as the OpenSolaris version of VirtualBox is finished. First off, we need to get sources for VirtualBox from the subversion repository.

joe% svn co vbox
joe% cd vbox

Next up you'll want to make sure the configure script knows how to find your newly built QT stuff. Edit the file "configure" and change the line that sets QTDIR="...." to be QTDIR="/opt/qt64"

Now you ought to be able to run configure. Currently OpenSolaris has an older version of libxml2 than what VirtualBox likes, so the VirtualBox repository includes a newer version. The same, newer version of libxml2 will soon be integrated into OpenSolaris, so this is only temporary.

joe% configure --build-libxml2

If the configure step reports an error you may need to go back and change something. Once it works, it will leave an environment file that can be used to setup your build environment. Since I'm normally using tcsh, I have to temporarily go through ksh to get the settings. Once set up, the kmk command will build VirtualBox.

You need to have QT in your paths for building VirtualBox. Also include "." which is needed to run VirtualBox. Note that if you just built or installed QT elsewhere use your own install path.

joe% ksh
# . ./
# tcsh
joe% setenv QTDIR /opt/qt64
joe% setenv PATH .:${QTDIR}/bin:${PATH}
joe% kmk

After a little while, you should have a successful build of VirtualBox. Once you've built VirtualBox, you have to install the kernel driver component for Solaris.

joe% cd src/VBox/HostDrivers/Support/solaris
joe% su
root% ./       
-- this will fail with "can't load module: ...", don't worry.
root% add_drv vboxdrv root% chmod a+rw /devices/pseudo/vboxdrv\*

That's it. You can now go to the binaries directory and start the VirtualBox application.

joe% ksh
$ . ./
$ tcsh
joe% setenv PATH .:/opt/qt64/bin:${PATH}
joe% setenv LD_LIBRARY_PATH .:/opt/qt64/lib:${LD_LIBRARY_PATH}
joe% cd out/solaris.amd64/release/bin
joe% ./VirtualBox



Great article, but now when there is a Beta for OpenSolaris on VirtualBox homepage, how do I install/run that download?

Posted by Per on February 12, 2008 at 03:51 PM PST #

Joe - Great demo - very cool.

I tee up a question on my blog - how will server virtualization impact the storage industry and storage customer requirements? Would love to hear your take on this - my thoughts are here:

Best, Taylor

Posted by Taylor Allis on February 13, 2008 at 12:18 AM PST #

Kernel module is loaded on my laptop ( 32bit Solaris SXDE 1/08 )

bash-3.2# modinfo | grep vboxdrv
232 f8570000 ceb0 264 1 vboxdrv (VirtualBox Driver)

bat VERR_VM_DRIVER_NOT_INSTALLED error is returned.
VirtualBox kernel driver not installed.
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).

The vboxdrv driver not running on SXDE 1/08 ?

Posted by gianc64 on February 20, 2008 at 05:31 AM PST #

Hi gianc64,

try before run VirtualBox.

ln -s /devices/pseudo/vboxdrv\\@0:vboxdrv /dev/vboxdrv


Posted by thaniwa on February 20, 2008 at 04:26 PM PST #

Hi joe,

Now VB on my SXDE 1/08 ( 32 bit Lifebook FujitsuSiemens )
is up and running. Maybe would be insert in the HowTo for
x85 users .

Thank for the help!


Posted by VBox is up and running! on February 20, 2008 at 07:55 PM PST #

Post a Comment:
Comments are closed for this entry.



« June 2016

No bookmarks in folder


No bookmarks in folder