by Yuli Vasiliev
Published April 2013
For years, the only way to evaluate a new operating system was to install it on a dedicated machine, as a standalone system, or with existing operating systems in a multiboot scenario. In any case, you had to install your operating system on the bare metal and, therefore, you did not have the ability to run more than one operating system at a time on a single physical machine.
This situation has changed since cross-platform virtualizers such as Oracle VM VirtualBox appeared. With such a virtualizer installed in your system, you obtain the ability to have multiple operating systems running simultaneously—each in a separate virtual machine (VM)—on an individual physical server.
This article discusses how you might evaluate Oracle Linux, running it inside a virtual machine on top of your existing operating system whether that OS is Microsoft Windows, Mac OS X, Oracle Solaris, or another version of Linux. You'll learn of some alternatives that Oracle offers for an Oracle Linux image for Oracle VM VirtualBox. In particular, we'll look at the Oracle Linux VirtualBox Image for Hands-On Lab appliance, which contains the latest Oracle Linux operating system, and then move on to the full-blown Database Application Development VM appliance, which includes Oracle Linux as well as a number of other preinstalled Oracle products.
First, make sure your host system meets the following requirements:
Next, make sure you have Oracle VM VirtualBox 4.2 or later installed on your host operating system. This software can be installed on any of the following operating systems: Windows, Mac OS X, Oracle Solaris, and Linux. You might have to install some additional packages before installing Oracle VM VirtualBox. For further details, refer to the Oracle VM VirtualBox User Manual.
Then, to follow this article's sample, you'll need to download and install on your box the Oracle Linux VirtualBox Image for Hands-On Lab appliance, whose virtual machine contains a default desktop installation of Oracle Linux 6.3 (64-bit). For information about how to download and install this appliance, see the next section, "Importing the Oracle Linux VirtualBox Image to Oracle VM VirtualBox."
Another appliance discussed in this article is the Database Application Development VM. This appliance contains Oracle Linux and some other preinstalled Oracle software components, including Oracle Database, Oracle SQL Developer, and Oracle JDeveloper, and it has a similar set of requirements:
Installing and using this appliance is described in the section "Playing with Oracle Software Installed in the Guest."
To import the Oracle Linux VirtualBox Image for Hands-On Lab appliance archive into your Oracle VM VirtualBox, follow these steps:
OracleLinux63.ovafile to your system.
OracleLinux63.ovaarchive, select the archive, and click Open.
After the process of appliance importing has been successfully completed, Oracle VM VirtualBox Manager should contain the newly created virtual machine called Oracle Virtual Sysadmin Days, which is shown in Figure 1:
Figure 1. Oracle VM VirtualBox Manager after importing the Oracle Linux VirtualBox Image.
You can change most of the virtual machine settings that were specified during the importing stage. To open the Oracle Sysadmin Days — Settings dialog box, select the icon for the newly created Oracle Virtual Sysadmin Days virtual machine in the left pane of the Oracle VM VirtualBox Manager window and then click the Settings button.
Once you are done changing the settings, you can launch the virtual machine in Oracle VM VirtualBox. To do this, double-click the virtual machine's icon, which is shown in the left pane of the Oracle VM VirtualBox Manager window. The booting process should start.
When prompted to log in, you might log in as user
oracle, which is available by default, using password
oracle. Also, you might log in as
root using the same password:
After a successful login, you should see the desktop of the Oracle Linux 6 operating system running as a virtual machine in your Oracle VM VirtualBox, as shown in Figure 2.
Figure 2. The desktop of the Oracle Linux 6 operating system running as a virtual machine within Oracle VM VirtualBox.
Regardless of your host operating system, from now on, you have two operating systems running on your machine simultaneously. Thus, you can work with an instance of Oracle Linux 6 running as a guest operating system, and your host operating system is still available, of course.
Now that you have Oracle Linux 6 running in a virtual machine, you can play with it. Let's accomplish some simple administration tasks, using the tools available in your Oracle Linux 6 virtual machine. It's important to emphasize that the same GUI tools and commands that are available with a conventional Oracle Linux 6 installation are available with an Oracle Linux 6 virtual machine.
Say, you want to add a new user account to your system. This can be done with either the User Manager GUI or the command-line interface (CLI).
First let's look at how you might accomplish this task with the User Manager GUI. These next steps will walk you through the entire process:
root, you'll be asked to enter the root password to proceed.
Figure 3. Creating a new user with the User Manager GUI.
As an alternative, you could accomplish this same task of creating a new user through the CLI. To do this, follow these steps:
root, you might use
suto switch to it.
# useradd -d /home/tjoe -m tjoe -g dba
# passwd tjoe Changing password for user tjoe New password: Retype new password: passwd: all authentication tokens updated successfully
After completing the steps above, you will be able to log in as the
Another administrative task you might want to accomplish would be to install some additional software packages to enhance the functionality of your default Oracle Linux virtual machine installation. Suppose you want to take advantage of the SELinux Management GUI tool, which is part of the
policycoreutils-gui package. This package is not installed by default; therefore, you'll need to install it. The Oracle Linux 6.3 VM is configured "out of the box" to install packages from the public yum server. So, you might take advantage of the
yum install command to download and install the package:
# yum install policycoreutils-gui
For details on how to install additional packages using external repositories, refer to "Installing Additional Packages on Oracle Linux." Also, for details on package management, you might want to check out Hands-on Lab — Oracle Linux Package Management.
Another way to install the package and its dependencies is from the installation media—the same way as you would with a regular Oracle Linux installation.
You might have a number of virtual machines running on a single computer simultaneously. Each virtual machine can be assigned to a unique IP address allowing it to act as if it were a physical machine on the network. Oracle VM VirtualBox allows you to choose a networking mode for the network adapter to be used in the virtual machine. Below is the list of available options:
For further details on the networking options that Oracle VM VirtualBox offers, you can check out the "Networking in VirtualBox" post. For a detailed discussion of how to configure your network in Oracle Linux 6, refer to the documentation.
Going back to our sample, suppose you currently have your networking adapter in the guest set to operate in the NAT networking mode, which, as mentioned earlier, is the default networking mode in Oracle VM VirtualBox. Now suppose you want to reconfigure your network adapter to meet more-advanced networking needs by changing to the bridged networking mode. The steps below will help you achieve that:
Figure 4. The Network dialog box for the setting network adapters of a virtual machine.
Note that in the Name list, you choose a physical network interface of the host. Bridged networking will use this interface, intercepting the data destined for a guest's virtual network interface from the physical network.
Figure 5. Configuring a network interface within a virtual machine.
After the network interface has been configured and is working, the first thing you probably will want to do is to ping the host and the other virtual machines on the network. If the pings are OK, this tends to suggest that physical and virtual network interfaces are functionally working.
Next, you might want to establish an
ssh connection to the host or another virtual machine:
# ssh 192.168.100.10 The authenticity of host '192.168.100.10 (192.168.100.10)' can't be established. RSA key fingerprint is 19:28:46:6a:36:17:4b:ca:c8:86:ff:06:b0:17:f0:a6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.100.10' (RSA) to the list of known hosts. firstname.lastname@example.org's password: Last login: Sun Feb 17 23:57:34 2013 from 192.168.100.2 [root@localhost ~]#
You can now move around the file system of the host or virtual machine you just connected to.
It's interesting to note that networking is not the only means when it comes to integration between your virtual machine and the outside world. The Oracle VM VirtualBox Guest Additions are a set of device drivers and system applications that are installed in the guest operating system and provide the following features for better integration between the guest and host:
For further details, you can check out Oracle VM VirtualBox User Manual.
Now that you have an idea of how Oracle Linux works inside a virtual machine, you might want to play with software installed in the system. To do this, you would need first to install some software components in your Oracle Linux system running inside a virtual machine. Alternatively, you might take advantage of the Database Application Development VM appliance mentioned in the "Prerequisites" section of this article. This appliance uses Oracle Linux as the operating system with some other Oracle products preinstalled on it, including Oracle Database, Oracle SQL Developer, Oracle JDeveloper, as well as some other Oracle products.
The Database Application Development VM appliance is packed in the
Oracle_Developer_Day.ova file. The steps for importing this appliance into your Oracle VM VirtualBox are similar to those you followed when importing the Oracle Linux VirtualBox image, as described in the "Importing the Oracle Linux VirtualBox Image to Oracle VM VirtualBox" section earlier. For more details on the requirements and setup for the Database Application Development VM appliance, refer to the instructions on this Oracle Technology Network Developer Day page. Once you're done, you can launch this appliance from within Oracle VM VirtualBox Manager. If you connect as user
oracle, you should see the screen shown in Figure 6:
Figure 6. Oracle Developers Days virtual machine.
Now you can start playing with the software components that are preinstalled. For example, to launch an SQL*Plus session to interact with the Oracle Database software that is preinstalled inside the virtual machine, you can just type
sqlplus in a terminal window:
Figure 7. Connecting to the Oracle Database software that is preinstalled in the virtual machine.
Launching other preinstalled components is also a breeze. For example, to run Oracle JDeveloper, you can just double-click its icon, which is available from the desktop of the virtual machine.
Oracle VM VirtualBox makes it possible to evaluate a new operating system without having to install it on the bare metal, by instead running it inside a virtual machine. You can install Oracle VM VirtualBox on the most popular operating systems, including Windows, Mac OS X, Linux, and Oracle Solaris.
After installing Oracle VM VirtualBox, you can import an appliance that contains an operating system guest, thus getting a good opportunity to test the operating system in a virtualized environment. Oracle VM VirtualBox allows you to have multiple virtual machines running simultaneously on a single physical machine.
Yuli Vasiliev is a software developer, freelance author, and consultant currently specializing in open source development, Java technologies, business intelligence (BI), databases, service-oriented architecture (SOA) and, more recently, virtualization. He is the author of a series of books on Oracle technology, the most recent one being Oracle Business Intelligence: An Introduction to Business Analysis and Reporting (Packt, 2010).
|Revision 1.0, 04/15/2013|