Solaris 10 in a VM

I've noted previously that one of the non-Sun distros of OpenSolaris (Nexenta) is available in a VM.  Now, Sun has now quietly added the Solaris Enterprise System Virtual Machine 1.0 to the Sun Download Center (as a free download).  This is Solaris 10 Update 1, plus the Studio 11 compilers, plus all the Java Enterprise System software - app server, web server, directory server, etc. - all in a VMware virtual machine.  No OS or application install, just download and untar, fire up VMware Player/Server/Workstation (take your pick), and power the VM on. 

The VM seems to work pretty well, though there are a few caveats.  The virtual disk is IDE, so don't try to  use this with ESX or VI3 (which don't support IDE virtual disks).  It's also 20GB, so be sure to have plenty of disk space available on the host.  Also, this is update 1, not update 2, so it doesn't have the latest patches (or ZFS for that matter).  And the VM doesn't have the VMware guest tools installed, though that's easy enough to do if you're running a recent version of Player, Server, or Workstation.  Installing guest tools will improve the console UI experience and networking performance (though be sure to fix up the /etc/hostname.* and /etc/dhcp.* files after installing).  (If anyone from Sun involved in creating this is reading, I have some suggestions for improvements.)

I assume the various included components each have their own license restrictions, so examine the licenses carefully.  Solaris itself has a free right-to-use but you'll need to pay for support.

The README for the VM mentions the availability of a smaller S10U2 VM without the JES and Studio apps, but I haven't been able to find it.  A search on sun.com just hits the VM above as well as a bunch of references to the JVM.

Update (3/19/07): there are now four Solaris VMs available from Sun, including S10U3 and Solaris Express (aka Nevada) build 55.  VMware tools are pre-installed (at least in the two I downloaded), but the VMs are still using IDE disks so they won't work for ESX/VI users.

More on VMware and Solaris

Nice step-by-step writeup on installing Solaris 10 in a VM. Most of it also applies to Solaris Express.

A couple of things to add to my earlier notes on VMware/Solaris issues. The latest kernel patches for Solaris 10 (118844-19 and 118844-20) cause a panic on boot on some systems, including in a VMware virtual machine. Some limited details are available here. The workaround is to boot under the kernel debugger (kmdb) - type "b kmdb" when you get the "(b)oot or (i)nterpreter" prompt. You can make this persistent with "eeprom boot-file=kmdb" once you're booted (or by messing around with the boot configuration menus, but I don't recommend that for the easily frustrated).

The latest version of Solaris Express (build 27a, the one with ZFS) won't install in a VM if you use the graphical install and the default guest memory size (256MB). It hangs trying to load the X server and window system into memory. Either increase the memory (I suggest at least 512MB), or select the text install by hitting "4" when you get the question about install type. This should be fixed in a later build (to automatically fall back to the text install if there isn't enough room for the graphical install).

VMware and OpenSolaris

As a former Solaris engineer, I'm interested in helping people use Solaris and OpenSolaris with VMware.  VMware and Sun have announced that full support for Solaris will be added in future versions of VMware products.  In the meantime, the existing products can be made to work, but there are a few issues.  Here's some of the ones I know of (with workarounds).  Note: these aren't official recommendations from VMware (except where I've linked to vmware.com docs); they've worked for me, but your mileage may vary.

There are a couple of issues with virtual LSI Logic SCSI disks. Solaris 8 and 9 (GA) didn't come with a driver for the LSI Logic disk; if you try to install you'll get an error message saying something about "divide by zero error".  The fix is to either download the driver from the LSI website and install it as an ITU (details available with the driver), or upgrade to a recent update of Solaris 9 (which includes the driver) or to Solaris 10 or later.  More details are available here.

In addition, the LSI (actually "mpt") driver in versions of Solaris later than Solaris 10 (i.e., Solaris Express or OpenSolaris) contains some changes that don't work with Workstation 5.0.  You can either install on a virtual IDE drive (select the "custom" option when creating the VM), or use the beta of Workstation 5.5 (or the new VMware Player) instead. Setting up the X server can be a bit of a challenge.

The Xsun server available in Solaris 9 is actually pretty straightforward: kdmconfig will autoselect the VMware driver and a 1024x768 screen.  To change the screen size, run kdmconfig (as root) and pick a new size.  The Xorg server used by default in Solaris 10 and later is a bit more of a problem - it comes up OK, but the default screen size is pretty small (800x600). To change that, you can either switch back to the Xsun server by running kdmconfig, or run /usr/X11/bin/xorgconfig to reconfigure the Xorg server.  Some tips from other folks who have gone the xorgconfig route are available here and here.