Installing OpenSolaris in Oracle VM for x86
By scottdickson on Mar 03, 2010
Yeh, Virginia, you can install OpenSolaris as a guest in an Oracle VM for x86 environment! Here is a little step-by-step guide on how to do it. I am going to assume that you already have downloaded and installed Oracle VM Server. Further, I am going to assume that you have already created an Oracle VM Manager system to manage your OVM farm. All of that is more than I can tackle today. But, to get you started, you can fetch the OVM am VM Manager bits from http://edelivery.oracle.com/linux . I found the simplest thing to do was to create an Oracle Enterprise Linux management system and install the VM Manager there.
Once you have the OVM environment established, you need to get some installation media to install the guests. For OpenSolaris, here's the magic: Bootable AI. Check out Alok's blog for more details on exactly what the Bootable AI project is about. But in a nutshell, this make it so that you can install OpenSolaris as if you were using a network install server, but while you are booted from installation media. This gets around the difficulty of trying to do an installation using a LiveCD in a tiny VNC window and the difficulty of trying to get a network, PXE-based installation working. This is a quick and easy way to go.
Fetch the OpenSolaris AI iso rather than the regular LiveCD iso. Install this into the VM Manager resource repository. (Remember, I assum you know how to do this, or can figure it out pretty easily. I did.)
Now, create a VM just as you always would for Oracle Enterprise Linux, Solaris, Windows, or whatever. Select Install from installation media, and use the iso that you just added to the repostiory. When you specify what operating system this VM will run, select "Other" since it isn't one of the pre-defined choices. Start the creation and away you go.
As you have already figured out from Alok's blog, this is only half of the story. You still must create an AI manifest. The manifest details which packages to install and from where, along with the details for the first user created, root password, etc. Check out the Automated Installation Project page for details on this. The docs are pretty good and the minimum manifest needed for bootable AI is pretty basic. Alok talks about how to specify booting from the development repository. That was the only change to the default manifest that I made.
Put this manifest somewhere accessible via http from the VM you want to create. The VM you created is sitting, waiting for you to tell it where to fetch its manifest so it can boot. You really don't want to keep it waiting much longer.
Connect to the VM using VNC. You can use the built-in VNC client in VM Manager or whatever VNC client you like best. I tend to use vncviewer because it seems to manage the screen resolutions better than the Java client. When the installer prompts you for the manifest, enter the URL for the manifest you just made. The installer will fetch it, validate it, and then go on with its usual installation using that manifest. This is so simple and so cool!
Installation proceeds like it would with an install server. You can log in on the console of the system being installed and monitor is progress. Then, when it's done, reboot and you are done.
One note: I have run into difficulting with OpenSolaris b133 and this approach. When I used the b133 iso, even though I never got an error, the resulting VM was not bootable. (No, I haven't got around to filing a bug on this. Was going to wait until b134.) However, if I use the b131 iso and a manifest that referenced installing firstname.lastname@example.org things worked out just fine. So, give that a shot.
Once you have created a VM that you like within Oracle VM, you can do all of the cool Oracle VM things - convert it to a template and stamp out lots of copies, move it from server to server, etc. But that's for another day. Or that's something to look for in Honglin Su's blog.