In this lab, you will learn how to install the Oracle Solaris 11.4 Image for Oracle VM VirtualBox—the easiest way to get up and running with Oracle Solaris 11.4.

Published April 2015
Updated May 2023


This lab is the first is a series of labs for Oracle Solaris 11. All of the labs in the series have these prerequisites in common:

  • Operating system: Windows, Mac OS X, Linux, or Oracle Solaris on x86
  • Memory: 4 GB of RAM

Before starting the lab, ensure you have installed the following:

Also, you must enable hardware virtualization support in the BIOS. Oracle Solaris depends on those capabilities.

Exercise 1: Download the Oracle Solaris 11 VM for Oracle VM VirtualBox

Download the template (that is, the virtual machine [VM]) called Oracle Solaris 11.4 Oracle VM Template for Oracle VM VirtualBox.

This page is found off the main Oracle Solaris downloads page.

Exercise 2: Import the Oracle Solaris 11.4 VM into Oracle VM VirtualBox

  1. 1. Start Oracle VM VirtualBox.
  2. 2. Select File > Import Appliance. (This lab shows screen shots on a Mac. Screens might look slightly different on a PC.)
Figure 1. Selecting the appliance to import

Figure 1. Selecting the appliance to import

Browse to the location where you downloaded the Oracle Solaris 11.4 VM and select it. Notice that Figure 1 mentions the OVF format, but the downloaded file is a .ova file, which is the entire archive (including OVF.xml). Click Continue.

  • 3. Before importing the VM, check the memory settings.
Figure 2. Appliance settings screen

Figure 2. Appliance settings screen

Scroll down to check how much memory is allocated to the image. Oracle Solaris 11.4 requires a minimum of 4 GB of memory.

Figure 3. Checking the amount of allocated memory

Figure 3. Checking the amount of allocated memory

  • 4. Click the Import button.

Exercise 3: Start the Oracle Solaris 11.4 VM

In this exercise, we will run Oracle Solaris 11 for the first time—getting a basic understanding of what's there:

  • 1. Select the Oracle Solaris 11.4 VM and click the green arrow labeled Start.
Figure 4. Starting the VM

Figure 4. Starting the VM

On first boot, the System Configuration Tool runs, prompting you to enter system information providing an explanation of what is to follow. Note that during installation, you have to actively switch between the VM and your host OS. Oracle VM VirtualBox will open a window to explain this. After the VM boots, the environments are integrated, so when you move the mouse pointer over the VM, any input will be directed to the VM, and when you move the mouse pointer outside the VM, subsequent input will go to the host OS.

Figure 5. First screen of the System Configuration Tool

Figure 5. First screen of the System Configuration Tool

  • 2. Now, using F2 to move through the screens, first:
    • - Set the region
    • - Set the country
    • - Set the time zone
  • 3. The next screen will prompt you for system name.
  • 4. The third screen will prompt for networking settings. Choose Automatic.
  • 5. Next will be three screens to set the time:
  • 6. Then set the date.
  • 7. And select the keyboard.
  • 8. Set the password. Make sure you enter user account information as well as the root password. You will log in through the user account.
Figure 6. Screen for entering user account and password information

Figure 6. Screen for entering user account and password information

  • 9. Next, there will be two screens to enable the Oracle Configuration Manager, that is, 'phone home' capability. Unless you enter your My Oracle Support credentials (e-mail address and password) this data gathering facility will not be activated. (No specific user information is collected and Oracle treats the data collected as a customer's private information.)
  • 10. Finally, you will be presented with a summary page:
Figure 7. Summary screen

Figure 7. Summary screen

  • 11. Press F2 to apply the specified configuration, and then Oracle Solaris will complete the configuration/boot process.
  • 12. Log in to Oracle Solaris using the user account you set up in Step 8 above.

For this example, we created the user demo during the configuration step, so we now log into that account.

Figure 8. Login screen

Figure 8. Login screen

  • 13. After logging in, you should see the blank background of the user's desktop. Bring up a terminal window by clicking the icon that looks like a computer screen (located on the left side of the top bar of the Oracle VM VirtualBox window).
Figure 9. Opening a terminal window

Figure 9. Opening a terminal window

  • 14. To get started, investigate the Oracle VM VirtualBox package by running the command pkginfo -l SUNWvboxguest in the terminal window.
Figure 10. Investigating the Oracle VM VirtualBox package

Figure 10. Investigating the Oracle VM VirtualBox package

The Oracle Solaris guest additions package creates tighter integration between the host OS and Oracle Solaris. For example, you can cut and paste text between the two operating systems. You can also put Oracle Solaris into full-screen mode. Do this now by selecting Machine > Switch to Fullscreen.

Exiting full-screen mode is most easily accomplished by moving your mouse cursor to the bottom middle of the screen, which will cause a menu to appear.

  • 15. Next, enter the following command:

zfs list

This will print out data about all the pools and subpools created. Because there is only one pool in use on this system, a more succinct way to get information is to just look at rpool with the zpool(1M) command:

zpool list rpool

Figure 11. Listing data about all the pools and subpools

Figure 11. Listing data about all the pools and subpools

  • 16. If you regularly use sudo(1), you can type in a command such as the following and enter the password of the demo account.

sudo cat /etc/sudoers

Doing this will give you privileges to run as the root user for five minutes. The demo account user attributes are in /etc/user_attr. If you look at the contents of the file, you will notice that when the demo user was created, it was given the role of type=root. Hence, it can operate with root privileges.

Exercise 4: Take a Snapshot

There are two ways to take a snapshot of your environment. The first is the traditional mechanism for VMs—capture all the information of that machine so that you can start it up from that saved state later. This includes a snapshot of the local file system.

To take a snapshot, from the VirtualBox menu, select Machine > Take Snapshot. Give the snapshot a name and optional description:

Figure 12. Creating a snapshot

Figure 12. Creating a snapshot

The other approach is using the capability of ZFS. There are two ways to do this: one for system administrators and one for users.

For System Administrators (SAs)

To create a snapshot (called a boot environment [BE]), use the beadm(1M) command. A BE includes all the files Oracle Solaris needs to operate.

For example, to create a snapshot of the current Oracle Solaris environment, run the following command:

# beadm create

After a snapshot has been created, the SA would then perform some action that would impact the Oracle Solaris environment, say, adding new packages. In the unlikely situation there is a problem from this action, the SA can reboot to safety-net-be to get back to a known working state.

When updating packages, for example, installing the monthly Support Repository Update, a boot environment is typically automatically created and the patches will be applied to that BE, not to the running system. In that case, after updating, the SA would reboot into the just-created BE containing the updated Oracle Solaris environment. If, after some testing, the SA is not satisfied with the update, it is easy to reboot to the pre-update state.

Creating a BE (a copy of your current Oracle Solaris environment) is a very fast process and shows off one of the key feature of ZFS: What is initially copied are mostly pointers to data blocks in the file system, not data blocks themselves. Over time, as the current Oracle Solaris environment changes, blocks might need to be rewritten. The old version of a block pointed to by the BE created earlier would not be updated, but a new block would be created for the current BE with updated data. BEs are not only fast to create, they are very economical from a storage perspective because the copy, that is, the current BE, has only blocks that are different from the original environment. Over time as changes are made, and new blocks are modified, added, or deleted, the snapshot grows. ZFS snapshots are fast and efficient, but they are only a snapshot the Oracle Solaris part of the system (for example, anything that could be patched). So user directories such as /export/home are not included in a snapshot. ZFS snapshots, though, are immensely helpful when making any system software changes, because it is a trivial reboot to get back to the previous environment.

See the beadm(1M) man page for information on how to select what BE to activate on next reboot, or any other of a number of administrative actions.

For Users

In any sort of production environment, backups are made on a regular basis. Individuals can augment these through Time Slider, a facility that allows taking frequent snapshots of a user's data. Time Slider can be accessed from the desktop through System->Administration-> Time Slider.

Wrap Up

That's it for this very brief introduction. Now you have an environment in which you can begin to learn about all the great features in Oracle Solaris 11. And with the snapshot features mentioned above, you never have to worry about messing anything up, because you can always roll back to a prior known good state.

When you are ready to halt the VM, go to the upper left corner of the display and click System. From that menu, you can shut down the system.

See Also

For additional information about Oracle Solaris 11 and the technologies used in this lab, see "Taking Your First Steps with Oracle Solaris 11."

About the Author

Jeff McMeekin is an Oracle Solaris product manager.