Sunny Affairs

Getting Started with OpenSolaris 2008.05 and VMware Fusion

Saturday May 17, 2008

OpenSolaris 2008.05 has been out for quite some time now. Unfortunately the release took place in the middle of examinations and therefore I could not give a good try. Anyways now I am over with all my examinations and I decided to give it a go. As usual I am on my Macbook Pro: 2.16Ghz Core2duo with 2 Gbs of RAM. Now I only had about 4 GB of free disk space on my hard disk so I had to empty some of the contents. I moved my old OpenSolaris (Build 72) VM to my external hard disk and it freed about 9 GBs. So now with 13 GBs at hand I started off with a new VMware Fusion (using version 1.1 build 62573) virtual machine. This is the configuration of my VM:
Guest OS: Solaris 10 64-bit
Memory: 800 Mb
Virtual Processors: 1
Hard Disk: 12 Gb (Virtual)
Network Adaptor configured to Share the host's internet connection (NAT)
System Sound Connected
CD/DVD using the OpenSolaris 2008.05 disk image (which is also in my hard disk)

So I booted off the disk and it quickly loaded the GRUB menu.
Without waiting I selected the default option: OpenSolaris 2008.05
It took about 2 mins and 5 secs to boot to the OpenSolaris GNOME Desktop (including the time to select the language and keyboard - negligible). It is the first distribution of OpenSolaris that I am using which does not require a login at start up. Even the beta releases of this operating system also required you to login before you reach your desktop.
First look:
1. Just as expected, the desktop resolution was preset to a very high 1280x1024. Although this resolution can fit into the Macbook Pro screen which has a resolution of 1440x900 but it is definitely disturbing when you are using it in the single window mode cause you cannot see the entire desktop at one time and you have to use the scrollers very often. Anyways I quickly changed the desktop resolution to 800x600, which made the virtual machine fit perfectly on the screen.
2. NWAM has seamlessly set up the network (NAT) with the host operating system and allocated an IP address. I checked out Firefox and the internet was working right out of the box.
3. The entire layout is very similar to Ubuntu (of course I knew this beforehand cause I had tried the Beta release as well).
4. The sound device was not recognized.
5. The system clock was not synchronized with the host operating system.



6. Also, there is no Thrash icon in the panel.
7. A new Window Selector at the top right corner.




Before checking on the other things, I decided to start installation of OpenSolaris to the Virtual Hard Disk. The Setup Icon is available right on the desktop (like you would find it in Ubuntu). Installation is a piece of cake. Extremely straightforward and keeps you out of the filesystem configuration unlike Ubuntu. I guess it uses the same Caiman Installer, but with some modifications to go with this new distribution. So what are the steps:
1. Welcome: A simple welcome screen which also links you to the release notes. Most of you would straight away press Next on this screen without reading anything.
2. Disk: Select the disk where you would like to install. You have the option of either partitioning the disk or using the whole disk. The Recommended disk size is 7 Gb and the minimum is 3 Gb. I decided to use my entire virtual disk.
3. Timezone: You can select the time zone from here. It gives you a very innovative method of selecting time zone. A map of the entire world is shown. You can use the magnifying glass to zoom and select city corresponding to your time zone.
4. Locale: Select your language support and also the locale specific data formats.
5. Users: Set the root password and a new user for yourself. You can also give a computer name here.
6. Installation: Recheck all your settings and hit install. The entire installation took about 23 mins and 30 secs on my laptop, which is much faster than the previous installations.

7. Finish: Once the installation completes you can review the installation log and reboot the computer to start the newly installed operating system.

Now while the installation was taking place I just went through some of the other features. First the terminal. The default shell now is bash, one of the best thing that could have happened. Which means now your command history can be seen through the up-arrow key, backspaces work perfectly etc.

A new device driver utility is present right at the desktop. It shows you details of the installed drivers and also the devices whose drivers are missing.
In case the drivers are missing, you can submit the information to hardware compatibility list.

The file browser looks same as before.
One point to note is that the installation really sucks your resources. Look at my CPU usage during this time:


Once the installation process completes, you can simply reboot the machine to boot into your newly installed operating system.
One major change you would find in the new GRUB menu is that there is no failsafe session available. The only option available is OpenSolaris 2008.05 snv_86_rc3 x86.
On selecting this option your booting process will most likely hang for about 3 minutes. This is because of the same old bug.

Now this distribution of Solaris has a ZFS root filesystem. You can see at the time of booting that the ZFS configurations are read and the ZFS filesystems are mounted.

The login screen is really simple. Unlike the earlier distributions of OpenSolaris this time you will find only 3 buttons. Options, Start Again and OK.



The Options allow you to select the language or the session. The available options in sessions are: GNOME, Run Xclient script, Failsafe GNOME, Failsafe Terminal. Note that unlike the previous distributions, there is no Common Desktop Environment.



Also you are not allowed to login into the root account.



To get root privileges in your account you can use the command su on the terminal and then enter your root password.
Another change to notice at the login screen is that unlike the other distributions this one represents each character entered at the password screen with an asterix (*). Thus you can see the number of characters that the password contains.



Another hitch here is that unless you install the VMware Tools, the login screen will have a resolution of 1280x1024.

Once you login, your Solaris is Up and running, but to make it run properly I feel the following things have to be looked into at first:
1. Correcting the GRUB options in order to boot into 32-bit mode by default.
2. Installing VMware Tools
3. Correct the Network Issues.
4. Get the sound working.

Taking the first issue: You need to make a change in the GRUB menu in order to force Solaris to boot into the 32-bit mode. Note that since OpenSolaris is using a ZFS root, the menu.lst file has been moved to: /rpool/boot/grub/menu.lst

You can either correct the default entry by removing $ISADIR from the kernel and module path, or make a new entry with the following paths:
kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/boot_archive

This should correct your booting issues. Make sure you make necessary changes in the title if you are adding a new entry so as to not get confused at the GRUB menu:

Installing VMware Tools poses a little bit of problem because you cannot login as a root. You can mount the disk image of the VMware Tools for Solaris (located at: /Library/Application Support/VMware Fusion/isoimages/solaris.iso). Extract the file vmware-solaris-tools.tar.gz and run the perl script vmware-install.pl

The installation will end with an error where it will be unable to copy a file /usr/lib/vmware-ttols/configurator/autostart-vmware-user.sh to /usr/dt/config/Xsession.d/9999.autostart-vmware-user.sh
This will have to be done manually, using the super-user priviledges. Once you create the necessary folder and copy the required file, run the perl script again and this time the installation would complete itself.

Once you restart your computer the changes will take effect. I have noticed only two major changes. Firstly the login screen will be of the correct size as mentioned in the start-up resolution (in my case I set it as 800x600). Also the time is now synchronized with the host machine.



Apart from these two changes no other effect took place eg drag and drop between host and guest etc. I guess the VMware Tools needs to be upgraded for this new distribution.

Now about the network issues. Strangely, in the installed system, the dns lookup was failing. So in Firefox when you put in the address http://www.google.co.in it reports a server not found error. Instead, if you put http://64.233.187.99 it will open up google properly.
This can be temporarily corrected by inserting this line in the file /etc/resolv.conf:
nameserver xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is the IP address of your Primary/Secondary DNS servers.
This setting will take effect on restarting the computer. Although for this session the browser would work properly, but not in the following sessions because NWAM removes the manual entries from the file /etc/resolv.conf
Unfortunately, I was unable to get a proper solution for this. You can turn off NWAM to preserve your entries. To turn off NWAM and start the default networking service do the following:
$ svcadm disable /network/physical:nwam
$ svcadm enable /network/physical:default
Now you can configure your network from the Network Settings at System > Administration > Network. You can also insert your DNS server addresses here.
Once you reboot your computer, you will get an error like this:



Pressing Log In Anyway logs you in, and doesn't seem to have any negative effect on your computer. You can work as usual and your browser will work perfectly.

But after a while I switched it back to the nwam and everything started working normally again. I haven't figured out why exactly it was giving a problem initially, but nevertheless the issue has resolved.

Note: Make sure you insert your proxy settings in case you are behind a proxy server. Go to System > Preference > Network Proxy for inserting the system-wide proxy settings. In Firefox you can enter your proxy settings at Edit > Preferences > Advanced > Network > Connection > Settings

Finally to get the sound working, download the Open System Sound driver from http://www.4front-tech.com/download.cgi. Get the driver for Solaris 10/11 (x86/AMD64). Once the package downloads, you can install it by using the pkgadd -d command. Restart the machine and issue the command osstest to test the sound. Your Volume icon at the top right would have also been enabled after this driver is installed.
Don't worry about the error shown at the end of the command osstest.

Ah, finally a near perfect system to start all your work.

I find that the new OpenSolaris 2008.05 is extremely simple and easy to use. It is aimed at desktop computers. It runs pretty well in VMware Fusion. Just that at times it freezes the computer (maybe there are some VMware bugs, I am not using the latest build of VMware). And definitely its quite a lot faster than the Community/Developer editions of OpenSolaris. The final installed Virtual Machine only takes about 2.72Gb, much lesser than the other distributions, although it lacks many packages eg OpenOffice.org which can be installed using the Package Manager (System > Administration > Package Manager). Additionally you have Compiz Fusion right out of the box.

I will give OpenSolaris 2008.05 a try on VirtualBox, maybe it will work even better than that, and hopefully have another blog entry describing my experience with that.

[15] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg
Comments:

Although making the directory /usr/dt/config/Xsession.d may have allowed the vmware config to complete "successfully", I didn't do much good - it's not being executed at login. That directory was used by Xsession when it was tailored for dtlogin. With OpenSolaris we have gdm, and Xsession has been reworked (see /etc/X11/gdm/Xsession). The analogue to the old Xsession.d directory is now /etc/X11/xinit/xinitrc.d. So, you should create *that* directory (I have no idea why it's not created by default - that's a bug IMO), and copy the script there. Maybe you could create a symlink at /usr/dt/config/Xsession.d which points to /etc/X11/xinit/xinitrc.d, to allow the vmware script to complete successfully.

Posted by Bob Doolittle on June 02, 2008 at 02:39 AM IST #

[Trackback] Souvik over at the Sunny Affairs blog has a really great, exhaustively documented, walk through of OpenSolaris 2008.05 running on his MacBook Pro with VMware Fusion. If you've ever wondered about trying out OpenSolaris in a virtual machine, this is

Posted by Team Fusion on June 03, 2008 at 04:32 PM IST #

Hey, thanks! I started reading your article thinking I should try out this Solaris release, just out of curiosity, but you've documented/screengrabbed it so much that I don't feel a need to do so anymore! So, thank you for giving me back 4 hours of my life - nice job!

Posted by Jean-Francois Arseneault on June 03, 2008 at 06:49 PM IST #

You are welcome... But do give it a try, OpenSolaris 2008.05 is a very nice release.

Posted by Souvik on June 03, 2008 at 07:59 PM IST #

After creating the /usr/dt/config/Xsession.d directory, VMware Tools can be installed successfully. But once you reboot, you'll get "vmhgfs mismatch" error message; besides I can not have proper login windows. So I had to remove installed VMware Tools.

Posted by Honglin Su on June 15, 2008 at 12:47 PM IST #

Hey Honglin, I didnot face any such error when I had done that. Maybe you got a slightly different configuration.

Posted by Souvik on June 15, 2008 at 09:14 PM IST #

This is great, keep up the great work.

Posted by Ganesh on June 16, 2008 at 02:04 PM IST #

I didn't have the luck you had with OpenSolaris 2008.05 on VMware Fusion, at first.

Booting the installer in GUI or text-only mode (after the longmode 64-bit fixes are added) ends up with a lot of svc.start errors, and the asking for the root password to do system maintenance.

It seems the key to ketting the system booted was selecting "Solaris 64-bit" guest OS. This might be obvious to some, but it wasn't to me (i.e OpenSolaris != Solaris), so I had selected "Other 64-bit. After changing this to Solaris 64-bit guest OS in setup, I was able to continue.

Posted by Armando Di Cianno on June 16, 2008 at 08:28 PM IST #

Nice to know that you got the thing sorted. Although I really doubt that the problem took place because you chose "other 64-bit". I have not tried OpenSolaris 2008.05 with this configuration, but the OpenSolaris Nevada distro worked perfectly fine on both of them. I guess the choice of OS at the start is mainly used to identify which VMware Tools to install. Is there any notable difference in the .vmx config file??

Posted by Souvik on June 16, 2008 at 08:43 PM IST #

http://www.dicianno.org/blog/2008/06/16/vmware-fusion-20-beta-1-tools-and-opensolaris-200805/

I did a little write-up of the steps needed to get the vmware-user process to be launched by gdm, using the hint in the first comment here.

Posted by Armando Di Cianno on June 16, 2008 at 09:52 PM IST #

I still can't get the VMWare Tools to install properly. Even after following the Armando's instruction (I'm still using VMWare Fusion 1.1.3 so I'm wondering if that makes any difference), all I get is a blank screen.

I'm using a MacBook Pro and running Leopard 10.5.4. Anyone figured out a way to install VMWare Tools?

Posted by Takashi Yoshida on July 12, 2008 at 09:18 PM IST #

I have the same problem as Takashi - blank screen on VMware Fusion 1.1.3 - tried modifying xorg.conf resolutions settings via ssh to no avail. Looked in Xorg log and everything looks ok - VMWARE_CTRL and Vmware Xinerama both initialize without errors.

Posted by Ankush on July 28, 2008 at 08:01 PM IST #

Ok - I found the culprit. If you look in the last gdm log file there's reference to an unreferenced symbol in vmware_drv.so. I navigated to the path of the driver and found that there was a vmware_drv.so.PreVmwareToolsInstall. I renamed the broken one to vmware_drv.so.Broken and copied the other to vmware_drv.so. Did a quick reboot and BAM - it works.

Posted by Ankush on July 28, 2008 at 08:17 PM IST #

Thanks Ankush, that solved the problem for me when using VMware Fusion beta 2 on OS X :)

Posted by Phill Thomas on August 19, 2008 at 09:40 PM IST #

Nice one Ankush - that solved the issue for me as well fulling 2008.05 on VMWare Server 2.0.0 Build 101586. Renaming the file in /usr/X11/lib/modules/drivers worked perfectly. I renamed the existing vmware_drv.so to vmware_drv.so-broken and then renamed vmware_drv.so.PreVmwareToolsInstall into vmware_drv.so, rebooted and it works great. Copy and paste does not seem to work, but the video is much better. I will add your trick to my blog too - Thanks!

Posted by Pete Eby on August 23, 2008 at 08:29 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed