Virtual Environments provide an excellent “sandbox” for you to try out and get some real hands on experience with Oracle Solaris™ (x86). I’ve run Oracle Solaris (x86) in both VirtualBox™ and VMware™, but I prefer VirtualBox. After installing your Virtual Machine, you can add and clone additional Virtual Machines and start up more than one at a time to simulate a network of Solaris systems. I tell my students to setup a local lab to practice everything they’ve learned in class. For those who are using my book, setup a lab on your PC to follow the examples in my book. If you are fortunate to have a SPARC server, you can download Solaris for that too.
These instructions detail how to download and setup VirtualBox on an x86/AMD desktop or laptop. VirtualBox does not run on the SPARC platform. VirtualBox runs on everything that I’ve ever tried it on, so the hardware requirements are easily met. The only problem I’ve run into is loading VirtualBox on another Virtual machine. The VirtualBox.org website has good documentation and enough people use this product, so that any problem you encounter, is probably addressed there.
There are two methods of installing Solaris as a Virtual Machine in VirtualBox.
1) Install Solaris 10 or 11 from scratch using the Solaris media (allows customization)
This method is the same as installing Solaris on a x86 server.
2) Install Solaris 10 or 11 using a prebuilt appliance or virtual machine (easiest)
This method is easiest for first time users, but does not allow customization.
I describe both methods in this post.
VirtualBox is a free program and can be downloaded from http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html
VirtualBox can be installed on Windows, OS X, Linux and a Solaris (x86) host. On the above website, click on the link for your host operating system, download and install Oracle VirtualBox using all of the defaults.
Before following the steps below, download and install VirtualBox onto a desktop or laptop.
Option 1 – Installing using the Solaris Media
After installing Virtual Box on your PC, download the Full DVD (ISO image) – Oracle Solaris 10 (x86) from Oracle (approx 2.1 GB download)
Download the Full DVD ISO Image for x86 (not SPARC).
Download Solaris 11 from this URL: http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html
You’ll see several downloads listed, for beginners, I recommend the “Oracle Solaris Live Media for x86.”
Note: You will be using the x86 version of Solaris, not the SPARC version, so make sure you download the correct installation media.
If prompted for a login and password, signup for a free Oracle account.
1. After downloading the installation media, Install and Start VirtualBox on your PC by clicking on the icon:
2. Click on the New icon (Hilighted):
The Welcome screen will appear.
3. Click on Next and the Create New Virtual Machine window will be displayed. Click on Next.
4. Enter a name for your Solaris Virtual Machine, select the OS type and version (version does not need to be exact). Click on Next.
5. Select the amount of RAM. Keep in mind, Windows (the host system) will be using some of the RAM too. Make sure you leave at least 1GB for the Windows host. Click on Next.
6. Create a New Hard disk. I recommend 16GB which is the default. Click on Next.
7. The Virtual creation wizard screen is displayed, use the default (VDI) and click on Next.
8. The Virtual Disk Storage details screen is displayed. Use the default, Dynamically Allocated. This will save disk space on your host system.
The Virtual disk location and size screen will be displayed. You can select where the Virtual Machine and its disks will be created. Choose a location that has 3-4GB of free space.
The system will create a folder named “Virtual Box VMs.” All of your virtual machines and disks will be stored here.
9. Click Next when ready to move onto the next screen.
10. A summary screen is displayed. Review it and click on Create.
The new machine will now be listed in your VirtualBox Manager:
11. Highlight the machine and select Settings:
The Settings screen will be displayed as follows:
12. Click on Storage, then click on the DVD. The DVD will be labeled “Empty.” Then click on the Attributes section (see highlight) and select the location of the Solaris Full DVD ISO image that you downloaded earlier. Then select OK.
The VirtualBox manager window will be displayed. The Storage section (see highlight) should show the CD/DVD using the ISO image selected in the previous step.
13. Click on START and the installation will begin. The following window will begin the Solaris Installation program:
When the installation is complete, the Virtual Machine will still have the DVD mounted to the ISO image and will boot to it and restart the installation process. When this happens, you’ll see the Black GRUB menu displayed again as follows:
14. Click on Devices, then CD/DVD devices, then “Remove Disk from Virtual Drive.”
This will unmount the DVD ISO image from the CD/DVD.
15. Click on Machine, then RESET to restart from the Virtual Machine’s boot disk.
You’ll know that Solaris is installed and booting from the boot disk when it boots to the Blue GRUB menu as shown:
Option 2- Installing from an appliance
After downloading and installing Virtual Box on your PC, download the Solaris 11 appliance image from Oracle (approx 1.5GB download)
A list of prebuilt Solaris 11 virtual machines (appliances) are available here:
Scroll down and select Oracle Solaris 11 VM for Oracle VM VirtualBox
Solaris 10 virtual machines are located at this URL: http://www.oracle.com/technetwork/server-storage/solaris10/solaris-vm-405695.html
Download and uncompress the files and remember where you put them for the next step.
1. Install and Start VirtualBox on your PC by clicking on the icon:
2. Click on FILE from the top toolbar, then IMPORT APPLIANCE from the pulldown menu and the following screen will open:
3. Select the location of the unzipped files (Appliance Image) that you downloaded and unzipped earlier:
4. Click OPEN
5. Click NEXT. The Appliance Settings window will open. On this screen, you can modify the appliance settings before importing (or leave everything as is). You could change the amount of RAM allocated to the virtual machine or you could modify the location of the Virtual Disk Image. Click on IMPORT when finished.
6. Click FINISH
The Virtual Machine will appear in the Oracle VM VirtualBox Manager window. Highlight the machine and click on Start to start the machine up.
Install VirtualBox Additions Package
I recommend that you install the VirtualBox Additions package in the Solaris virtual machine. This makes the mouse and graphics a little easier to work with. It also allows you to cut/paste from the virtual machine and also resize the VM window.
1. Login to the Solaris VM
2. Click on Devices from the top toolbar and select Install Guest Additions from the pulldown menu.
Note: If you are unable to get the mouse to move outside of the VM window, press the Right Control key on your keyboard to free up the mouse.
A window will open on the Solaris desktop.
3. Double click on the runasroot.sh icon and click on the RUN button when the popup window opens:
4. Click on autorun.sh icon and click on the RUN button when the popup window opens. A window will open on the Solaris Desktop labelled, “Installing VirtualBox Additions.”
5. Press ENTER as prompted. Reboot the VirtualMachine and the installation is complete.
Create a Snapshot of the VM
Before using the virtual machine to practice, I recommend creating a Snapshot of the Solaris VM. Then, if you really mess up the Solaris system, you simply restore the VM snapshot and try again. To create the snapshot, follow these staps:
1. Shutdown Solaris by typing init 5 at the command prompt in a terminal window:
2. When the machine is powered down (be patient and give it time to shutdown and power off), click on the Snapshots icon in the Oracle VM VirtualBox Manager window:
3.When the snapshot window opens, click on the Camera icon:
4. You’ll be prompted for a name, enter a name and description. I like to add a description for each snapshot so that I know when each was taken. Snapshots can be taken at any point in time. Use them as you attempt new things with Solaris.
Have fun and good luck. As always, feel free to post questions or comments for others to learn from.