Evaluating Oracle Linux From Inside Oracle VM VirtualBox
by Yuli Vasiliev
Published April 2013
Learn how to evaluate Oracle Linux without having to install it on the bare metal.
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:
- 2 GB RAM at minimum
- 10 GB of free disk space (If you're a Windows user, it's a good idea to start with defragging the hard drive to enhance contiguous space, which is needed to boost virtualization. Also, make sure you have an NTFS file system to handle large files on Windows.)
- 1.7-GHz CPU or higher (recommended)
- A recent-version Web browser
- A PDF viewer
- Admin privileges on your system
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:
- 2 GB RAM at minimum
- 2-GHz CPU or higher (recommended)
- A recent-version Web browser
- A PDF viewer
- Admin privileges on your system
Installing and using this appliance is described in the section "Playing with Oracle Software Installed in the Guest."
Importing the Oracle Linux VirtualBox Image to Oracle VM VirtualBox
To import the Oracle Linux VirtualBox Image for Hands-On Lab appliance archive into your Oracle VM VirtualBox, follow these steps:
- 1. On the Oracle Linux VM Download page, follow the "Download (x86_64) (2.43 GB)" link to download the
OracleLinux63.ovafile to your system.
- 2. Start Oracle VM VirtualBox Manager from the start menu of your operating system.
- 3. In the Oracle VM VirtualBox Manager, choose File -> Import Appliance to launch the Appliance Import Wizard.
- 4. On the Appliance to Import screen of the wizard, click Open appliance, navigate to the location of the
OracleLinux63.ovaarchive, select the archive, and click Open.
- 5. On the Appliance Settings screen, you can change the appliance settings. For example, you might want to increase the amount of RAM to be allocated for the appliance.
- 6. After reviewing the settings, agree to the terms and conditions of the license agreement, and then click Import to start importing the appliance.
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.
Starting the Oracle Virtual Sysadmin Days VM
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.
Playing with the Oracle Linux 6 VM
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:
- 1. To launch the User Manager GUI, select System ->Administration ->User Manager.
- 2. If you're not connected as
root, you'll be asked to enter the root password to proceed.
- 3. Create a new user with useradd as follows:
# useradd -d /home/tjoe -m tjoe -g dba
- 4. Assign the newly created user a password:
# 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.
Interacting with the Outside World
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:
- Not attached—This mode implies that no network connection is available, as if no Ethernet cable was connected to the network card.
- Network Address Translation (NAT)—This networking mode is the default and it requires no configuration on either the host or the guest. With this mode, virtual machines cannot talk to each other. However, you can browse the Web, download files, and view e-mails within the guest.
- Host-only—In this mode, the virtual machines can interact with each other and the host but they cannot talk to the outside world. A physical network interface need not be present.
- Bridged networking—This networking mode allows you to set up routing between the guest and the rest of the network, using a virtual network interface filtering data from the physical network adapter. Thus, the guest can talk to the host, other virtual machines on the network, and the outside world. The latter allows you to run servers in a guest.
- Internal networking—This mode is much like bridged networking when it comes to communicating with the other virtual machines on the same host, but it is more secure and does not let you communicate with an external network.
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.
Figure 5. Configuring a network interface within a virtual machine.
- 1. Shut down your Oracle Linux 6 virtual machine if it's running.
- 2. In the left pane of the Oracle VM VirtualBox Manager, select the virtual machine's icon.
- 3. On the toolbar of the Oracle VM VirtualBox Manager, click Network to launch the Network dialog box shown in Figure 4:
- 4. In the Network dialog box, click the Adapter 1 tab.
- 5. In the Attached To list, select Bridged Adapter. Then, select a network interface from the Name list.
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.
- 6. In the Network dialog box, expand Advanced and choose Allow All in the Promiscuous Mode list. Finally, click OK to save the changes and close the dialog box.
- 7. In the Oracle VM VirtualBox Manager, double-click the virtual machine's icon to launch the VM.
- 8 . After the virtual machine is loaded, you can configure the virtual network adapter. For that, in the virtual machine, select System ->Preferences ->Network Connections to open the Network Connections dialog box.
- 9. In the Network Connections dialog box, move to the Wired tab, choose the adapter to configure, and then click Edit.
- 10. In the Editing ethX dialog box (shown in Figure 5), move to the IPv4 Settings tab. Then choose Manual in the Method list, and then set the IP address, netmask, and gateway, as appropriate:
- 11. In the Editing ethX dialog box, click Apply to save the changes and close the dialog box.
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. email@example.com'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.
Using Oracle VM VirtualBox Guest Additions
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:
- Sharing folders between the host and the guest
- Sharing the clipboard between the guest and host
- Mouse pointer integration
- Seamless windows
- Automated logons
- Time synchronization
For further details, you can check out Oracle VM VirtualBox User Manual.
Playing with Oracle Software Installed in the Guest
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.
- Oracle VM VirtualBox download page
- Pre-Built Developer VMs for Oracle VM VirtualBox page
- Oracle VM VirtualBox User Manual
- Oracle Linux Installation Guide
- Oracle Linux Deployment Guide
About the Author
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).
Want technical articles like this one delivered to your inbox? Subscribe to the Systems Community Newsletter—only technical content for sysadmins and developers.