Getting Started With OpenSolaris
Previous Next

Running OpenSolaris in VirtualBox

The VirtualBoxTM software runs as an application in your operating system, providing an environment called a virtual machine, which enables you to install other operating systems as “guests” inside the virtual machine.

The VirtualBox software supports the following host operating systems.

Table 3-1 VirtualBox Hosts

Host Operating Systems

Supported Versions

Windows

  • Windows XP – All service packs

  • Windows Server 2003

  • Windows Vista – 32-bit and 64-bit

Linux on 32-bit and 64-bit systems

  • Debian GNU/Linux 3.1 at minimum

  • Fedora Core 4 at minimum

  • Gentoo Linux

  • Red Hat Enterprise Linux 3 at minimum

  • SuSE Linux 9 at minimum

  • OpenSuSE 10.1 at minimum

  • Ubuntu 5.10 at minimum

  • Mandriva 2007.1 and 2008.0

Apple Mac OS X (Intel)

All

How to Set Up OpenSolaris in a VirtualBox

Before running OpenSolaris inside your existing operating system, you must first install the VirtualBox application. After VirtualBox is successfully installed on your computer, you can run the OpenSolaris ISO image or the Live CD as a virtual guest “in the box.” You do not need to burn a DVD.


Note - A minimum of 10 GB of disk space or virtual disk space is recommended in order to install the VirtualBox and to install the OpenSolaris release inside the VirtualBox.


To set up and run OpenSolaris inside VirtualBox, use the following procedure:

  1. Download the VirtualBox application for your operating system from the Sun Download Center.

    Save the application to your desktop or local disk.

  2. Download an OpenSolaris ISO image from http://www.opensolaris.com/get/ or order a free Live CD.

    For convenience, save the file to the same location where you placed your VirtualBox files.


    Note - The ISO image requires about 685 Mbytes on your hard drive. The download can take several minutes.


  3. Install VirtualBox, following the specific instructions for your “host” operating system:
  4. Configure VirtualBox, per instructions at How to Configure VirtualBox for Use With OpenSolaris.
  5. Start OpenSolaris, per the instructions at How to Start OpenSolaris 2009.06 Using VirtualBox.

How to Install VirtualBox on a Windows or Macintosh (Intel) System

  1. Navigate to the downloaded VirtualBox installation files or folder.

    For Macintosh, this is a .dmg image file.

  2. To start the installation, double-click the VirtualBox installation file and click Next or Continue.
  3. Accept the license agreement and click Next or Continue
  4. Choose a location for the VirtualBox software, accepting the default location or modifying the location.

    Note - You need 10 Gbytes or more disk space to install both VirtualBox and the OpenSolaris image.


  5. Click the Install button.

    If requested, enter your user password.

  6. When the completion message is displayed, click Close or Finish.

How to Install VirtualBox on a Linux System


Note - Download the latest version of VirtualBox as described previously, even if your Linux distribution comes with a VirtualBox version preinstalled. The preinstalled VirtualBox software is usually the Open Source Edition (OSE), which might not be suitable for running the OpenSolaris 2009.06 release.


  1. Open a terminal window and become the root user.
  2. Navigate to the downloaded VirtualBox installation file.
  3. Depending on your Linux distribution, start the installation process by using one of the following commands:
    • On rpm-based systems, such as Fedora, SuSE, or Red Hat, type the following:
      rpm -ihv filename

      Replace filename with the name of the downloaded installation file.

    • On deb-based systems, like Debian, or Ubuntu, type the following:
      dpkg -i filename

      Replace filename with the name of the downloaded installation file.


    Note - You might need to install additional packages to fulfill dependencies.


    The installer searches for a precompiled kernel module. If no kernel module is available that is precompiled for your system, the installer attempts to compile and install a kernel module.


    Note - You need to have basic build utilities, such as gcc, make, binutils, and kernel header, installed for the installer to be able to build the kernel module. Usually, these utilities are part of the standard installation of your Linux system. If these utilities are not present, the installer will be unable to build the kernel module. In this case, install the build utilities and manually start the kernel module compilation later by running /etc/init.d vboxdrv setup as root user.


  4. Add the current user to the vboxusers group.
    1. In a terminal window, type:
      sudo usermod -G vboxusers -a username

      Replace username with the name of the current user.

    2. Log out and log in again to apply the changes.
  5. Open a terminal window, type VirtualBox, and press Enter to start the VirtualBox.
  6. Accept the license agreement.

How to Configure VirtualBox for Use With OpenSolaris

Before You Begin

If you have the OpenSolaris Live CD, boot to your host operating system, then insert the Live CD. Then, open the VirtualBox application.

  1. Start VirtualBox by using one of the following steps:
    • On Windows, click the Start button, and select VirtualBox from the list of programs.
    • On Linux, open a terminal window, type VirtualBox, and press Enter.
    • On Mac OS X, open Applications in the Finder and double-click VirtualBox.
  2. On the first start of VirtualBox, type your registration information and click Confirm.

    The main VirtualBox window appears.

  3. Click the New icon on the left side of the GUI, and click Next in the pop-up window.
  4. Type a name for your virtual machine, and from the drop-down list, select OpenSolaris as the operating system. Click Next.
  5. Select the amount of RAM to allocate to the OpenSolaris installation inside VirtualBox. Click Next.

    Note - 512 Mbytes is the recommended minimum size. If you have 2 Gbytes or more of memory on your system, you should choose 1 Gbyte for optimum performance. See substep C of the next step.


  6. Add a Virtual Disk Image (vdi) by selecting a name or adding a new name to the list. For the initial installation, follow these substeps:
    1. Select New and click Next.
    2. Accept the default Dynamically Expanding Image and click Next.
    3. Accept the default name, or type a path and name, and allocate space for the image.
    4. When you've completed the settings, click Next.
    5. Click Finish to create the disk image.
  7. When the initial Virtual Disk Manager GUI appears with your new vdi file selected, click Next.
  8. In the Summary screen, click Finish.

    The main VirtualBox window appears. Your virtual OpenSolaris machine is displayed in the left panel, and is ready to use as a virtual machine.

  9. Click the CD/DVD-ROM link on the right-hand side, in the Details tab.
  10. Check Mount CD/DVD Drive and select one of the following:
    • If you are using the OpenSolaris Live CD, select Host CD/DVD Drive and close the Settings screen. Skip step 11.

    • If you are using a downloaded OpenSolaris ISO image, select ISO Image File and go to step 11.

  11. In the drop-down list, select the downloaded OpenSolaris ISO image. If the ISO image is not in the list, add the image as follows:
    1. Click the Select icon in the right of the drop-down list.
    2. Click the CD/DVD Images tab.
    3. Click the Add icon.
    4. Navigate to the downloaded OpenSolaris ISO image file and click Open.
    5. Click Select and close the Settings screen.
    6. Close the Settings screen.

How to Start OpenSolaris 2009.06 Using VirtualBox

  1. Start VirtualBox by using one of the following options:
    • On Windows, click the Start button and select VirtualBox from the list of programs.
    • On Linux, select VirtualBox from the System Tools menu (GNOME desktop) or from the System menu (KDE desktop).
    • On Mac OS X, open Applications in the Finder and double-click VirtualBox.
  2. Double-click your virtual machine icon or select it and click Start.

    Note - Unless you have the ISO on a CD, click the CD/DVD-ROM link and verify that the OpenSolaris ISO image file is selected.


    The GRUB boot menu with three options is displayed. Then a SunOS Release message is displayed. Finally, a list of languages appears.

  3. When the list of keyboard layouts appears, press Enter to accept the English default. Or, type the number for your keyboard layout and press Enter.

    Note - When you click inside the VirtualBox window with your virtual machine running, the mouse cursor is trapped inside the virtual desktop. Use the Host Key to release the mouse cursor again. The Host Key is indicated at the lower right corner of the VirtualBox window. By default, the Host Key is the right Ctrl key on Windows and Linux, and the left Cmd key on Mac OS X.


  4. When the list of desktop languages appears, press Enter to accept the English default, or type the number to select another language and then press Enter.

    The application takes one or two minutes to load.

    When the desktop screen appears, you are “in the box,” running the OpenSolaris 2009.06 release.


    Note - You should install OpenSolaris to your virtual hard drive in order to be able to install programs and save configurations.


  5. To install OpenSolaris 2009.06 on your virtual hard disk, click the Install OpenSolaris icon on the OpenSolaris desktop.

    For installation instructions, see Installing OpenSolaris 2009.06 From the Live CD.

Previous Next