|
|
Getting Started with OpenSolaris using VMWareBy Bill RushmoreFebruary 27, 2006 So you want to try out OpenSolaris, but you don't have a machine available. Then VMware is what you need. Even if you do, VMware is great tool to get help you get started with OpenSolaris and can be a great tool to help you on your kernel hacking efforts. VMware workstation 5.5 has "experimental" support for Solaris, but I have found that OpenSolaris actually runs quite well with it. This article will take you through the steps to get OpenSolaris up and running on VMware and assumes that you are new to VMware and OpenSolaris. This article will also be helpful if you are just interested in Solaris on VMware.First, you need to get yourself a copy of VM Workstation. It will run on Windows and some Linux distros. You really don't need super impressive hardware to get started. My first test machine has only 512 mb of memory and is limited with disk space which requires me to run off an external USB drive. In both cases the performance is tolerable. But, of course, the more memory, disk, and CPUs you have the better. You may be wondering, so what is VMware? VMware is an application that emulates a PC or runs as a virtual machine (VM). So basically when you run OpenSolaris on VMware, it acts as its own dedicated box, when actuality, it is running as an application on Windows or Linux. Hardware, such as NICs and video cards, is emulated in VMware, which can be your saviour if your underlying hardware isn't yet supported by Solaris. Once VM Workstation is installed, start by creating a new virtual machine. Creating the Virtual Machine
Installing Solaris Now get yourself a copy of Solaris Express. You should download the DVD ISO image -- yes, even if you don't have a DVD burner : you won't actually need to create a physical copy of the image. Once you have the Solaris Express ISO file go back into the VM settings. Select the CD-ROM and choose "Use ISO image" and enter the path to the ISO file. Since VMware is emulating a DVD-ROM device, it just mounts the ISO and the VM will think it is a physical drive. Once you have ISO mounted it is time to start up the VM. You'll notice the screen looks a lot like your PC when it starts up, Figure 7. Eventually you'll get to the Solaris install screens.
Fixing the Screen Size After the install completes, you will run into your first problem. During the install, the screen is at a normal size with no problems, but the first time Solaris boots up the screen resolution is too small at 640x480. Somehow, Solaris wasn't able to use the same resolution it used during the install, so you'll need to run "kdmconfig" to fix this. You'll need to log in to the Solaris console in text before the CDE login screen appears. If you miss it, I suggest you log in to a CDE session; it will be a little easier to manage with the small screen size. Here you can reboot and try again or run kdmconfig from a maximized terminal window, the only caveat being you won't be able to test your new setup.
Before you do anything else, make sure you make a snapshot of the VM you just created. This is very important because when you start experimenting with OpenSolaris development, it's quite possible that you can inadvertently make changes that will prevent your VMware image from booting -- of course, the host operating system will not be affected at all. Optionally, before you take a snapshot you can create a default user account first. The easiest way for the novice is to log in as root and then run "smc" from the command line. Once you have the new account set up and tested, shut down the virtual machine. Click on the "Clone this virtual machine" icon. You have the option of a full clone or linked clone. For the first image I suggest using a full clone so you can put the backup in a nice and safe place. Any time you log in to a windowing-system desktop, don't do anything else until you disable the screen saver. Otherwise, you'll have a locked screen that won't unlock. There is a bug in current Solaris Express builds with the screen saver that affects certain video cards, and the virtual video card in VMware is one of them. That said, even when the bug gets fixed, you may not want to be running a screen saver in VMware anyway (since the host OS probably has it's own screen saver). If you are only interested in Solaris Express you can stop. However, you're probably interested in getting the OpenSolaris source distribution or BFU archives and will want to install that. I highly recommend -- actually I INSIST -- that you clone your working VM before you BFU it. Even if you are an expert at the build process, you never know what kind of bug is waiting for you in the latest release. Remember that OpenSolaris is essentially experimental and Solaris on top of VMware is also experimental. If you need more help with OpenSolaris, I suggest you visit the OpenSolaris and the VMware forums. Both are filled with smart people willing to help. Also check on the VMware workstation help. Believe it or not, it has information specific to installing Solaris on VMware. -- By Bill Rushmore Contributors/Reviewers: Ignacio Marambio Catán, Dennis Clarke, Tim Foster, Felipe Salum |