How to Use Oracle VM VirtualBox Templates
by Yuli Vasiliev
Published July 2012
How to download, import, and configure Oracle VM VirtualBox Templates in Oracle VM VirtualBox.
This article explains how to use Oracle VM VirtualBox Templates in Oracle VM VirtualBox. It is similar to the article that explains how to prepare an Oracle VM environment to use Oracle VM Templates, but it describes how to download, install, and configure the templates within Oracle VM VirtualBox, instead of on bare metal.
About Templates for Oracle VM VirtualBox
Prebuilt developer virtual machines (VMs) for Oracle VM VirtualBox offer a quick way to install and experience entire software stacks packaged into deployable appliances, providing a good way to test new software. Moreover, the ability to run multiple VMs, each in an isolated environment on a single physical server, allows you to utilize the available computer resources much more efficiently.
OTN is all about helping you become familiar enough with Oracle technologies to make an informed decision. Articles, software downloads, documentation, and more. Join up and get the technical resources you need to do your job.
As an example, this article uses the Oracle VM VirtualBox template for Oracle VM Manager that is described in the "Quick Start Guide for the VirtualBox Template for Oracle VM Manager."
Note: To see the entire list of available developer VMs, visit the Pre-Built Developer VMs (for Oracle VM VirtualBox) page on the OTN Website.
A template for Oracle VM VirtualBox consists of a guest operating system and any software components preinstalled on this guest OS, as well as configuration information required for deployment. The guest OS of the template is Oracle Linux 5.7. The preinstalled software components include Oracle VM Manager 3.0.3 demo installation, Oracle WebLogic Server 10.3, and Oracle Database, Express Edition 11g.
Note: According to the Read Me First document that accompanies the Oracle VM VirtualBox Template, the template is designed for testing and development purposes only. Using it in production is not supported.
Before you can install the Oracle VM VirtualBox template for Oracle VM Manager that is discussed in this article, you need to have Oracle VM VirtualBox 4.1.8 or later installed on your host operating system. At the moment, Oracle VM VirtualBox is available for a number of operating systems, including Microsoft Windows, Mac OS X, Oracle Solaris, and Linux. For further details, check out the Oracle VM VirtualBox downloads page. As for the other software prerequisites, your system might require you to install some additional packages before starting the installation of Oracle VM VirtualBox. For more information, refer to the Oracle VM VirtualBox User Manual.
Also, make sure that your hardware is capable of running the template's virtual machine. In particular, the virtual machine is preconfigured with 4 GB of RAM for optimal running of the software. Therefore, Oracle VM VirtualBox must be able to allocate this amount of memory every time the virtual machine is started. Moreover, make sure that your host system has at least 15 GB of free disk space for the template—when installed, Oracle VM VirtualBox requires about 10 GB and 5 GB is required for the template's
Downloading and Importing the Oracle VM VirtualBox Template
.ova file for the template using this link. Put the downloaded file into the home directory of the user you are logged in as so it will be visible to Oracle VM VirtualBox Manager (the Oracle VM VirtualBox GUI) for importing.
Assuming you have already successfully installed Oracle VM VirtualBox, launch Oracle VM VirtualBox Manager from the Start menu of your operating system. In Oracle VM VirtualBox Manager, choose File -> Import Appliance to launch the Appliance Import Wizard, which will walk you through the import process.
During this process, you'll be able to change the suggested settings of the virtual machine being imported, and then you will be asked to accept the license terms. After the import has completed successfully, you should see the icon of the newly created virtual machine in the left pane of the Oracle VM VirtualBox Manager window, as shown in Figure 1.
Figure 1. Oracle VM VirtualBox Manager After Importing the Template
If you select the VM's icon, its settings will be displayed in the right pane. Click the Settings button to edit the settings. For your convenience, the settings are grouped in categories. If you need, for example, to edit the network settings of the virtual machine, you can click the Network icon at the left and then go to the settings of interest on the right.
Many setting categories are further subdivided. For example, to change the number of virtual CPUs in the virtual machine, you'll need to select System in the left pane and then click the Processor tab in the right pane, as shown in Figure 2.
Figure 2. The VM's Settings Dialog Box
Turning back to the network settings, it's important to note that Oracle VM VirtualBox allows you to choose between several networking modes when it comes to configuring a networking adapter plugged into the VM. Which option you should choose depends on the requirements of the software components running on your VM. Thus, in this particular example, you have to take into account the network requirements for Oracle VM Manager.
Just as a reminder, Oracle VM Manager is a key component of the Oracle VM architecture, and it is designed for configuring and managing Oracle VM Servers, networks, and other VM-related resources that might be located on different machines on your physical network. Also, it is important to emphasize that each Oracle VM Server must be installed on a dedicated machine. What this means in practice is that Oracle VM Manager must have a network connection to each of those VM servers' hosts.
The considerations above determine the appropriate networking mode for the network adapter to be used. It's fairly obvious that the Not attached, Internal networking, and Host-only networking options are not suitable here. Instead, you need an option that allows you to set up routing between the VM and the rest of the network. For such cases, Oracle VM VirtualBox offers the Bridged networking option, which allows you to create a virtual network interface on the guest, communicating ultimately through a physical network adapter installed on the host. Such a virtual network interface is given its own IP address and can be accessed by other machines on your network as if it were a physical device. To learn more about the networking mode options in Oracle VM VirtualBox, see the Networking in VirtualBox blog.
Launching a Template's Virtual Machine
To start the virtual machine, select its icon in the left pane of Oracle VM VirtualBox Manager and click the Start button. The VM's console appears, in which you should see the process of booting the VM into Oracle Linux, the guest operating system (see Figure 3).
During the first boot, you're prompted to enter the
root password and the network settings. The system will try to determine the IP information for the specified interface automatically through DHCP. If it fails, you'll be prompted to enter a static IP address as well as the other network-related information.
Figure 3. Setting Up the Network Properties During the First Boot of the VM
Oracle VM VirtualBox comes with a built-in DHCP server, which you have to configure before you can use it. When using the Bridged networking option, however, it's recommended to not use the built-in DHCP server, because it might conflict with other DHCP servers available in the network.
Configuring a Template's Virtual Machine
Templates come preconfigured to run the included software optimally. As you learned in the preceding section, most of the configuration work on your part has to be done during the first boot of the template's VM. However, you might need to change some settings later. For example, you can change the IP address of the VM using standard Linux procedures performed on the guest, as shown in Figure 4.
Figure 4. Changing the Network Configuration of the VM Using Standard Oracle Linux Tools
If you just want to change the IP address of your virtual network interface until the end of a current VM's session, you can do that through a terminal using the standard Linux
ifconfig command, as follows:
# ifconfig eth0 192.168.100.4 netmask 255.255.255.0 up
Before you can run the command above, however, you'll need to reconnect to the guest as
root because, by default, you're connected as the
Using a Template's Software
Now that you have the VM running, you can use the software it offers. In this particular example, you can play with Oracle VM Manager. This software is designed to manage an Oracle VM environment, which may contain one or several Oracle VM Servers running on different physical machines and logically grouped into a server pool or pools, storage repositories, virtual machines, networks, and other resources.
Before launching Oracle VM Manager, it's recommended that you familiarize yourself with the information provided in the Read Me First document, whose icon can be found on the guest's desktop. After that, launch Oracle VM Manager by double-clicking the Oracle VM Manager Login icon located a bit higher on the desktop. Then, to log in, you can use the following login and password pair: admin and Welcome1 (see Figure 5).
Figure 5. Welcome Dialog Box of Oracle VM Manager Running in the VM
It's important to note that launching Oracle VM Manager from within its VM, as discussed above, is not the only option you have in most cases. Strictly speaking, your options depend on the networking mode you're using. Thus, with the Bridged networking option, you might invoke Oracle VM Manager from within any node on your network. The only requirement is that the browser you're using must meet the requirements of Oracle VM Manager.
While a detailed discussion of Oracle VM is outside the scope of this article, in brief, the first thing you might want to do with the help of Oracle VM Manager is to discover one or more already installed Oracle VM Servers in your Oracle VM environment.
If you want to install an Oracle VM Server in your system for testing purposes, please note that this software takes over your entire hard drive, thus requiring a dedicated machine. Also, for storing your Oracle VM resources, including VM files, you'll need to have an Oracle VM storage repository that might be installed, for example, on an NFS file server or on a storage server exposing raw disks.
If you have these components installed in your system, the first series of steps you might want to perform with Oracle VM Manager could be the following:
1. Discover one or more Oracle VM Servers.
2. Create a server pool or pools.
3. Add the discovered server(s) to the server pool(s).
4. Register a file server or a storage array.
5. Create a storage repository for storing your Oracle VM resources.
It's important to note that the steps above are the same steps you normally would consider after a regular installation of Oracle VM Manager. In other words, there is no difference in this regard between running Oracle VM Manager on a regular Linux host and running it within Oracle VM VirtualBox. Remember, though: According to the Read Me First document that accompanies the Oracle VM VirtualBox Template, the template is designed for testing and development purposes only. Using it in production is not supported.
It's interesting to note that Oracle VM Manager is not the only software component available through the VM being discussed here. First of all, it's the guest OS, Oracle Linux, that provides the ability for you to use other software components or even install new ones, loading installation packages from the network or local devices using CDs/DVDs or USB devices. Before you can use USB devices from Oracle VM VirtualBox guests, though, make sure to include the operating system user you're logged in as to the user group
vboxusers. If you're an Oracle Linux user, the Oracle VM VirtualBox installer should have automatically created the
The purpose of this article was to give you a quick look at Oracle VM Templates for Oracle VM VirtualBox and demonstrate how easy it is to obtain a template and then import it into Oracle VM VirtualBox to create a VM. Then, you learned how to configure the template's VM in compliance with the requirements of the software that runs on the VM.
Here are URLs for the resources referenced earlier in this article:
"How to Use Oracle VM Templates": http://www.oracle.com/technetwork/articles/servers-storage-admin/configure-vm-templates-1656261.html
"Quick Start Guide for the VirtualBox Template for Oracle VM Manager": http://www.oracle.com/technetwork/server-storage/vm/template-1482544.html
Pre-Built Developer VMs (for Oracle VM VirtualBox) page: http://www.oracle.com/technetwork/community/developer-vm/index.html
Oracle VM VirtualBox downloads page: http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html
Oracle VM VirtualBox Template download: http://download.oracle.com/otn-pub/otn_software/OracleVMManager3.ova
Also see the Oracle VM Templates Website: http://www.oracle.com/technetwork/server-storage/vm/templates-101937.html.
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).
Revision 1.0, 07/11/2012