Exploring Sun's xVM VirtualBox
By mhuff on May 16, 2008
There is a new name in town, VirtualBox.
VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See "About VirtualBox" for an introduction.
Since being acquired by Sun Microsystems, VirtualBox Version 1.6 is the first major release since the acquisition.
VirtualBox also runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.
- Toshiba M9 laptop
Intel® Core™2 Duo Processor
You'll first need to download VirtualBox, by clicking here.
Select the Platform and Language you desire. In my case since my Toshiba M9 laptop has a Intel dual core processor, and running Solaris Nevada Build 87, I selected the Platform OpenSolaris AMD64.
With VirtualBox, you can run unmodified operating systems – including all of the software that is installed on them – directly on top of your existing operating system, in a special environment that is called a “virtual machine”. Your physical computer is then usually called the “host”, while the virtual machine is often called a “guest”.
Step1: Let's start by launching Sun xVM VirtualBox.
root@sunrise8 # /opt/VirtualBox/VirtualBox
You will now see the Welcome to VirtualBox window
Step2: Let's create a new virtual machine. Start by clicking on the New button in the VirtualBox. You now get a dialog window stating, Welcome to the New Virtual machine Wizard box! Select the Next button.
Step3: In the VM Name and OS Type dialog window, give the name to the new Virtual Machine and the OS Type. In this case you'll notice the name I've selected is OpenSolaris2008.05 and the OS Type I've selected from the OS Type drop-down menu is Solaris. Now click the Next button.
Step4: In the Create New Virtual Machine Memory dialog you can adjust the memory size of your virtual machine. You'll notice it gives you a recommended base memory size of 512mb. In this case I've chosen to give this virtual machine 1024mb or 1gb. You do this by moving the Base Memory Size Slide Bar or just change the number in the associated box. After making your the necessary changes click the Next button.
Step5: In the Create New Virtual Machine Virtual Hard Disk dialog, you will select the image to be used as the boot hard disk for the virtual machine. You can either create a new hard disk using the New button or select an existing hard disk image from the drop-down list or by pressing the Existing button to invoke the Virtual Disk Manager dialog.
In this case I will choose New to create a new hard disk.
Step6: The Welcome to the New Virtual Disk Wizard dialog will appear which will help you create a new virtual hard disks image for your virtual machine.
In this case we will using the Next button to go to the next page of the wizard.
Step7: The Virtual Disk Image Type dialog window, you will now have two choices for your virtual disk image type. You can have either a dynamic expanding image, or a fixed-sized image. Please read the captions for each choice. Choice wisely!!!
In our case here, since I have enough disk space, we'll choose the dynamic expanding image.
Step8: In the Virtual Disk Location and Size dialog you can press the select buttonto select the location and name of the file to store the virtual hard disk image, or type the file name in the entry field.
In our case shown here the Image File Name was pre-selected for us call OpenSolairs2008.05. Also in this dialog window you will select the size of the virtual hard disk image in megabytes. This size will be reported to the Guest OS as the size of the virtual hard disk.
By default the wizard has chosen 16.00gb for our virtual hard disk image size. I will change this to 10gb for this exercise. Then click the Next button
Note: If you selected dynamic expanding image in the previous Virtual Disk Image Type dialog window above, the size of the image that is created here will not necessarily be 10gb, but could expand if needed to the full 10gb size. Keep your disk space in mind!!!!
Step9: The Create New Virtual Disk Summary dialog window will appear to give you a summary of the how your new virtual hard disk will be created.
The following screen shows your virtual hard disk image parameters. You can go back and change things if you'd like or in our case we will click the Finish button.
Step10: The Virtual Hard Disk dialog showing the Boot hard Disk (Primary Master)
This dialog well show you the path to the Virtual Hard Disk Image file. Click the Next button.
Step11: The Create New Virtual Machine Summary dialog will now show you the parameters of your new soon to be created virtual machine.
Click the Finish button
Note: To conserve the amount of reading in this post, I repeated Step1 through Step11 for my Windows XP virtual machine.
The next screenshot of the Sun xVM VirtualBox now shows the two Virtual Machines that are ready to be created and loaded.
Step12: From the Sun xVM VirtualBox dialog window, in our case here, we will need change some details shown on the right in the dialog window. For installing the the OpenSolaris2008.05 OS image and the WIndows XP image we will click on the CD/DVD-ROM details link and change the following parameters.
Note: I ignored the following error dialog box that appeared, warning me about the USB Proxy Service has not been ported to this host. I just clicked OK to move ahead.
In the OpenSolaris2008.05 Settings dialog window, I've selected the Mount CD/DVD-ROM checkbox, and the ISO Image File checkbox. Click the Select folder next to the drop-down box, to tell the installer the location of the OS image file. The Virtual Disk Manager dialog will open where you can added image locations. After adding the location of the image, click the Select button, then you can click the OK button, in this case the OpenSolaris2008.05 Settings dialog window.
Step13: Now you will see the Sun xVM VirtualBox dialog window with changes you made above, showing the details of the new OpenSolaris2008.05 virtual machine.
Highlight the Virtual Machine you want to install and click the Start button.
After clicking the Start Button you will now see the following informational dialog box. As you will notice the Auto capture keyboard option is turned on. this will cause the Virtual Machine to automatically capture the keyboard everytime the VM window is activated and make it unavailable to other applications running on your host machine. You can press the host key identified here as the Right Ctrl key to uncapture the keyboard and mouse. Please read it carefully, and click the OK button
Step14: After clicking the OK button in the VirtualBox - Information dialog, you will now begin the installation of the OS for the new Virtual Machine. You will be asked several questions before the OS actually starts loading. For this first installation we will be installing OpenSolaris 2008.05 release. Select OpenSolaris 2008.05 in the Grub menu, and hit enter.
After selecting OpenSolaris 2008.05 from the Grub menu, You'll now be prepare the live image for the new virtual machine for installation. On the new screen you will be asked to select a keyboard type. The default is 41 US English. For this exercise we'll take the default.
Now you'll be asked to select the desktop language you'd prefer. The default is English. In this case we'll take the default!! The system will now start configuring the devices, mount local partitions/cdrom, and read ZFS configuration.
After the virtual machine is configured you will see the following VirtualBox Informational dialog appear. Read the dialog for virtual machine optimization, and click OK to accept. After clicking the OK.
Please read the "OpenSolaris License". When finished click the Close button
After reading the "OpenSolaris License", your OpenSolaris 2008.05 Virtual Machine is running and ready to be installed with you Operating System. As shown below. Let's start by shutting down the virtual machine and restart it. From the Systems drop-down menu select shutdown
To restart the new OpenSolaris 2008.05 virtual machine, from the VitualBox widow select the OpenSolaris 2008.05 virtual machine and click the Start button.
Step15: You are now ready to install OpenSolaris 2008.05 release on the Virtual Machine. From the Virtual Machine click on the Install OpenSolaris icon to invoke the OpenSolaris 2008.05 installer.
You will now be presented with the OpenSolaris 1008.05 Installer dialog window. Read and click the Next button
The installer will now ask you where should OpenSolaris be install? The following dialog window is for Disk partition configuration. For this exercise we will take the default shown below. Click the Next button
Select Time Zone & Date Information. I've select the appropriate values for the OpenSolaris Virtual machine and clicked the Next button
You select the appropriate Locale for you OpenSolaris installation, then click the Next button
Next the installer will ask you for the Users information. The Root users password, you will create a new user as welll as naming you system.
A review on the installation settings before proceeding. You have the option of going back to change information. In our case we'll accept the setting and click the Install button.
Installing OpenSolaris 2008.05 on your Virtual Machine.
Your installation of OpenSolaris 2008.05 is now complete. As stated review the OpenSolairs install log for information. You now must reboot to start the system. However first I found you needed to quit and shutdown the virtual machine and unmount the ISO image or it will just read the mounted information and try to install again. So click on the Quit button, the install dialog window will go away.
Now select System and shutdown your virtual machine.
From the Sun xVM VirtualBox window, click on the CD/DVD-ROM link the following OpenSolaris2008.05 Settings dialog window will open.
Uncheck the Mount CD/DVD-ROM drive checkbox to unmount the ISO Image.
Step16: From the Sun xVM VirtualBox window, highlight the Virtual Machine you want to Power-on and click the Start button. In this case we'll highlight the newly installed OpenSolaris2008.05 virtual machine.
Again by clicking the Start button, this will Power-on the new OpenSolaris2008.05 virtual machine, and you will again see the familiar VirtualBox informational dialog box. As you will notice the Auto capture keyboard option is turned on. this will cause the Virtual Machine to automatically capture the keyboard every time the VM window is activated and make it unavailable to other applications running on your host machine. You can press the host key identified here as the Right Ctrl key to uncapture the keyboard and mouse. Please read it carefully, and click the OK button
Step17: After clicking the OK button above your virtual machine, will now be running and you will be presented with the Grub menu showing your new VirtualBox boot environment. Shown here. Select the OS from the Grub menu and boot OpenSolaris2008.08.
OpenSolaris 2008.05 should now be boot as shown below here.
Step18: Now that we have OpenSolaris 2008.05 booted, let's log in using the userID and password (or the Root User), we created when we installed the OpenSolaris2008.05 Operating System.
This next screenshot, I've launched a terminal window showing I've successfully booted a VM running OpenSolaris on a ZFS root filesystem.
There you go, "Basic VirtualBox in a Nutshell" Part II Running Windows XP in a VirtualBox VM next post.