OpenSolaris and VirtualBox
OpenSolaris and VirtualBox
I used to use OpenSolaris on my workstation while I was with the Sun Cluster group. When I moved to Cluster Filesystems, I got a new Dell laptop and I moved to Ubuntu out of necessity - I needed to use virtual machines (VMWare Server) for my work.
I have been looking for a way of moving to OpenSolaris and have been eying Xen as a possible replacement of VMWare. But the traffic on xen-discuss@opensolaris.org suggested enough difficulties and I kept away.
VirtualBox on OpenSolaris gave me a new reason to try things out. So, I decided to throw away Windows Vista (given to me, thanks to Dell) and decided to take OpenSolaris for a spin.
OpenSolaris Developer Preview 2 vs Solaris Express
I have used OpenSolaris and Solaris on Virtual machines and on workstations. So I am not a newbie. I had two options - Solaris Express or Indiana. Given that it is easier to upgrade Indiana (thanks to IPS a.k.a pkg(5)) and having tested it on a virtual machine, I decided on Indiana.
Installation of Indiana
So, I burnt the iso on to a CD and booted from it. Partition editing is disabled in preview 2. And certainly did not want to use the entire hard disk. So, I booted back into Ubuntu and changed the partition type of the Vista partition to Solaris and booted back to Indiana LiveCD.
Now the Solaris partition was recognized. And the rest of the installation was a piece of cake.
Grub entries for Ubuntu (and ext3 read only support)
Installation did not make entries for Ubuntu. And the default page on Firefox told me to get the entries from the Linux partition. Well, time for a resuce CD to access the Linux partitions? No!
Time to install read-only support for ext3/ntfs.
# wget http://www.genunix.org/distributions/belenix_site/binfiles/FSWfsmisc.tar.gz # gzip -cd FSWfsmisc.tar.gz | tar -xvf - # pkgadd -d . FSWfsmisc # mount -F ext2fs /dev/dsk/c7d0p1 /mnt/lin1 # cat /mnt/lin1/boot/grub/menu.lst
Copied the grub entries that I wanted to /rpool/boot/grub/menu.lst and I was done.
Thanks Moinak and Martin Rosenau!
Network drivers
Indiana had no trouble supplying drivers for my wireless network. But the Ethernet driver was not supported. I do have a wireless router. And nwam configured it just fine. But I did want the LAN to be functional as well. And thanks to Masayuki Murayama and Moinak Ghosh , it was as simple as
# wget http://blogs.sun.com/moinakg/resource/nicdrv.tar.bz2 # bzip2 -cd nicdrv.tar.bz2 | tar -xvf - # cd nicdrv # for i in `ls -d SFE*`; do yes | pkgadd -d . $i; done # ifconfig -a plumb[Note: The install script provided is broken.]
VirtualBox
Installing Virtual Box was a piece of cake
# wget http://virtualbox.org/download/testcase/VirtualBox-opensolaris-x86-1.5.51-r28414-beta1.tar.gz # gzip -cd VirtualBox-opensolaris-x86-1.5.51-r28414-beta1.tar.gz | tar -xf - # pkgadd -d VirtualBox-1.5.51-SunOS-x86-r28414 # VirtualBox
I had some trouble launching Virtual Box though.
No 64-bit VirtualBox
I have a 64 bit system and the VirtualBox vboxdrv driver is 32 bit only. So I had to boot into 32 bit. So, I added a new grub entry:
title OpenSolaris Developer Preview 32 bit kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS module$ /platform/i86pc/boot_archive
Now the driver vboxdrv loaded just fine. 'add_drv vboxdrv' confirmed this.
But still VirtualBox failed to start a virtual machine with the message:
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).
Need to be root user! But "su -" refused to connect to X. Setting DISPLAY, "xhost +", ForwardX11 etc did not fix the issue. Google came to the rescue again. Doing the "su" instead of "su -" did the trick.
Sound driver
My laptop has a 82801G (ICH7 family) Intel audio controller. And OpenSolaris does not support it yet. No problem, OSS has drivers for it!
# wget http://www.4front-tech.com/release/oss-solaris-v4.0-1014-i386.pkg # pkgadd -d oss-solaris-v4.0-1014-i386.pkg
However, though osstest produces sound, the audio devices do not show up in the sound preferences. This is a problem to be investigated for another day.
Blastwave
Blastwave
has a huge repository of packages for Solaris. So, I pkg-get a piece of it.
# pkgadd -d http://www.blastwave.org/pkg_get.pkg # /opt/csw/bin/pkg-get -i xchat # /opt/csw/bin/pkg-get -i xemacs
This should become simpler once the pkg(5) version of blastwave is unleashed.
Now, I am installing CentOS 5 on a virtual box!
Thanks for the detailed write-up.
I want to make sure I am reading this right. You are installing CentOS guest on a 32-bit Indy2 host via VirtualBox, is this correct?
Thanks again.
Posted by W. Wayne Liauh on March 10, 2008 at 02:45 PM IST #
Hello,
Fyi, there is a 64-bit driver for Solaris and it is located in /platform/i86pc/kernel/drv/amd64 so no need to boot in 32-bit.
For the sound issue, it seems that vbox 1.5.51 is lacking sound support for Solaris. But the source files from the trunk seem to have it src/VBox/Devices/Audio/solaudio.c
src/VBox/Devices/Audio/ossaudio.c
So, there may be a way to enable it by recompiling it...
-- Renaud
Posted by Renaud on March 10, 2008 at 04:41 PM IST #
Wayne@
Yes, you got it right. I have Indiana on my laptop (host). I installed centOS (32 bit) on a VirtualBox (guest).
Renaud@
I did not find the 64 bit vboxdrv. I am on Indiana (snv_79a) and the virtual box package did not come with one.
As for issues with sound, I have issues on the guest - my laptop. I don't care about sound on my virtual machines. :)
Posted by Manoj Joseph on March 11, 2008 at 03:33 PM IST #
Hi,
Thanks for the details. It would be really helpful if I could work around this:
- host is a 64-bit Fedora 9 (running on a AMD64 box)
- installed virtualBox, looks good
- then installed Solaris 10, the installation is good but when restart... It goes to "grub>"!
What do I suppose to do now? Any hint will be appreciated...
Thanks.
- Calvin
Posted by Calvin on November 01, 2008 at 02:07 PM IST #
To enable 64 bits operations you have to enable VT-x (Intel) or AMD-V on both your Bios and the VirtualBox General option panel.
For example most laptops like my current HP are not enabling VT-x by default. But this is required for 64 bits operations.
Regards,
Arnaud
Posted by Arnaud Gauthier on November 03, 2008 at 09:01 PM IST #