Setting Up a Solaris Lab – VirtualBox

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.

You may download and install Solaris 10 or 11 for free.  It’s perfectly legal, but read the Oracle agreement and terms of use.

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.

Overview:

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)

http://www.oracle.com/technetwork/server-storage/solaris10/downloads/index.html

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:

1

 

2. Click on the New icon (Hilighted):

2

 

The Welcome screen will appear.

3. Click on Next and the Create New Virtual Machine window will be displayed.  Click on Next.

3

 

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.

4

 

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.

5

 

6. Create a New Hard disk.  I recommend 16GB which is the default.  Click on Next.

6

 

7. The Virtual creation wizard screen is displayed, use the default (VDI) and click on Next.

7

 

8. The Virtual Disk Storage details screen is displayed.  Use the default, Dynamically Allocated.  This will save disk space on your host system.

8

 

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.

9

 

10. A summary screen is displayed.  Review it and click on Create.

10

 

The new machine will now be listed in your VirtualBox Manager:

11

 

11. Highlight the machine and select Settings:

12

 

The Settings screen will be displayed as follows:

13

 

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.

13.1

 

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.

14

 

13. Click on START and the installation will begin.  The following window will begin the Solaris Installation program:

15

 

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:

16

 

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.

15.1

 

You’ll know that Solaris is installed and booting from the boot disk when it boots to the Blue GRUB menu as shown:

17

 

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:

http://www.oracle.com/technetwork/server-storage/solaris11/downloads/virtual-machines-1355605.html

 

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:

1

 

2. Click on FILE from the top toolbar, then IMPORT APPLIANCE from the pulldown menu and the following screen will open:

18

 

3. Select the location of the unzipped files (Appliance Image) that you downloaded and unzipped earlier:

19

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.

20

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.

21

 

A window will open on the Solaris desktop.

22

 

3. Double click on the runasroot.sh icon and click on the RUN button when the popup window opens:

23

 

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.”

24

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:

25

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:

26

 

3.When the snapshot window opens, click on the Camera icon:

27

 

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.

 

Bill

13 thoughts on “Setting Up a Solaris Lab – VirtualBox”

  1. Hi Bill,

    I everytime got a failure when first booting livecd, text based installation or prepared VM template.

    long mode not supported, reboot.

    Virtualization in bios is ok, mashines were windows 7 64 bit, windows server 2008 r2 64 bit.
    Actual virtualbox was installed.

    any ideas?

    Dirk

    1. Do you have virtual box running in a virtual machine such as terminal services or are these actual desktops. I’ve seen that issue when trying to run virtualbox inside of another virtual environment

      1. Thanks Bill you your quick answer, no it was a real PC in a training center with virtual box running.

        All clear: Bios options were not configured as needed. There was an advanced option in CPU where virtualization had to be enabled also. Everything works fine now.

  2. Hi, thanks for valuable post.
    i configured everything only problem i have is i could not connect from host windows 7 to solaris virtual box.
    how to resolve this issue

    1. You have to set the network settings on virtualbox to Host Only Adapter then choose the virtualbox adapter. Next, login to the Solaris VM and change the network interface to DHCP. You should see the solaris system get an IP address in the range of 192.168.56.x
      Then open putty on the desktop and connect to that IP address.
      You won’t be able to connect as root unless you change the sshd_config file on the Solaris system to allow root logins.

  3. hello, I try to install Solaris 11 no virtual box following your instructions but am stuck at grub window, I waited for long all I can see is just a still cursor, please what’s the way out……. I will be looking forward to a reply thanks in advance

    1. Assuming you are installing in virtualbox, are you sure that you selected Solaris 11 64 bit under the version pulldown when you created the virtual machine?
      Make sure the DVD is removed and that it’s booting off from the hard drive and not from the DVD.
      Did you install the text installer or using the Live media installer?

        1. You need to select Solaris 11 64 bit if you are installing Solaris 11. You should be able to click on the settings for that VM and change it to SOlaris 11 64 bit without reloading.

          1. thanks for sparing time to respond now I know where the problem originates from………. I appreciate it

  4. Hi Bill,i finally installed solaris 10 on my 32 bit system but the mouse is not responding ,please how do i resolve this?

    1. The mouse only works in the Java desktop environment. Try installing the virtual box additions in Solaris. It smooths out mouse and graphics issues.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to ensure you get the best experience on our website.