How to Virtualize and Deploy Oracle Applications in Minutes with Oracle VM

Hands-On Labs of the System Admin and Developer Community of OTN

by Christophe Pauliat and Olivier Canonge

This hands-on lab—for application architects or system administrators who need to deploy and manage Oracle Applications—demonstrates how to use Oracle VM Templates to virtualize and deploy complex Oracle Applications in minutes.

Published February 2013

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.
Global Lab Architecture
Exercise 1: Import Oracle RAC Template
Exercise 2: Create Two Virtual Disks to be Used by Future VMs
Exercise 3: Create a Virtual Network for Oracle RAC
Exercise 4: Change the Network Configuration of the Template
Exercise 5: Create Two Virtual Machines from the Template
Exercise 6: Add Shared Storage to the Two VMs
Exercise 7: Deploy a Two-Node Oracle RAC Cluster Using the Deploycluster Tool
See Also
About the Authors

This lab, which is Part 2 of a three-part series, provides step-by-step procedures for downloading and importing Oracle VM Templates, which are preconfigured, pretested, and fully certified for Oracle Applications.

You must have completed Part 1, "Deploying an IaaS Environment with Oracle VM," before you proceed with this lab; otherwise, you will not have some needed files and your environment will not be in the required state. You will reuse the Oracle VM environment you created in Part 1 but use a more sophisticated template to create a two-node Oracle Real Application Clusters (Oracle RAC) cluster. Oracle RAC—which is an option to Oracle Database, Enterprise Edition—is a cluster database with a shared-cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches.

Using Oracle VM Templates to deploy Oracle RAC can reduce deployment time from weeks or days to hours or minutes, because all the guesswork and details for patching, installation, and compatibility are removed from the deployment process. Oracle VM Templates for Oracle RAC can be used to build test or production clusters with any number of nodes, but their default is a two-node cluster.

Note: For more information about the time savings that Oracle VM Templates provide, read the Evaluator Group report "Oracle VM — Quantifying The Value of Application-Driven Virtualization."

Part 3 of this series is "Deploying a Cloud Infrastructure with Oracle VM 3.x and the Sun ZFS Storage Appliance."


This lab can be run at home or at your office on your own laptop, desktop, or server machine. You will need to run Part 1, "Deploying an IaaS Environment with Oracle VM," first to build the needed environment.

In this lab, we use Oracle VM VirtualBox to create two virtual machines that will later be used by Oracle VM Server for x86 and Oracle VM Manager, so that we can install all software components on a single physical machine.

Oracle VM VirtualBox is a free and widely used desktop virtualization tool. It is installed on an x86 operating system (OS) and is available on all the majors x86 operating systems, for example, Microsoft Windows XP, Microsoft Windows 7, many Linux distributions, Apple Mac OS, Oracle Solaris 10, and Oracle Solaris 11. Therefore, the native operating system on the laptop, desktop, server machine used for this lab can be any of these operating systems.

Note: All operations for this lab were tested only on Oracle Linux 6 update 3.

On Linux, Oracle Solaris, and Mac OS machines, you will use ssh and scp to connect and to transfer files. On Windows machines, you will need additional tools such as PuTTY and WinSCP.

In this lab, two layers of virtualization are used to limit the number of physical machines to one:

  • Oracle VM VirtualBox
  • Oracle VM Server for x86

In addition, two kinds of templates are used, so pay close attention to the instructions to ensure you use the right templates:

  • Oracle VM VirtualBox templates
  • Oracle VM Templates

Ensure You Have the Minimal Required Configuration

The minimal configuration needed for your laptop, desktop, or server is as follows:

  • 16 GB of memory
  • Intel or AMD X86 quad-thread processor (quad-core, or dual-core dual-thread)
  • 37 GB of disk space to store the files needed to start the lab
  • 50 GB of disk space to store the files that will be created during the lab

Download the Required Products

Download the following:

  • Oracle VM Template for Oracle RAC and Oracle Linux 6 Update 2 (32 bits) (Paravirtualized). There is also a 64-bit version of the template, but we will use the 32-bit version to save a few minutes during deployment. There are two files:

    • OVM_OL6U2_X86_11203RAC_PVM-1of2.tgz (578 MB), MD5 checksum 94d9c6e76cc1c47ddfc0b05ecfa2
    • OVM_OL6U2_X86_11203RAC_PVM-2of2.tgz (3.2 GB), MD5 checksum 99dde12d355edcee7a3376a8465e75d3
  • Deploycluster tool (v1.1.1), which is an optional tool that helps with Oracle RAC template deployment. There is one file: (5 MB), MD5 checksum 1dc5f0815ab2c11e0f8239735d409996.

Global Lab Architecture

Figure 1 shows all the components—Oracle VM VirtualBox virtual machines and Oracle VM (OVM) virtual machines—with their names and configuration (memory, IP address, and so on).

Figure 1

Figure 1

Exercise 1: Import Oracle RAC Template

In this exercise, we will import a new Oracle VM Template for Oracle RAC into the Oracle VM Manager we created in Part 1 of this series of labs.

  1. Make sure that the Oracle VM Server and Oracle VM Manager virtual machines are running:

    In Part 1, we created two virtual machines in Oracle VM VirtualBox:

    • Oracle VM Server 3.1.1, which is the server that runs the Oracle VM virtual machines
    • Oracle VM Manager 3.1.1, which is the administration console (Web console)
    1. Check in the Oracle VM VirtualBox console that the two VMs are running. If they are not running, start them and minimize both VMs.
    2. On your native OS, start a Web browser (Firefox, for instance) and open URL
    3. Log in to the Oracle VM Manager Web console using the following credentials:

      • Login: admin
      • Password: Welcome1
  2. Copy the Oracle RAC Template files to the right directory (/var/www/html/files) on the Oracle VM Server so that they can be imported into Oracle VM Manager using the HTTP protocol:

    As seen in Part 1, the most convenient way to import templates into Oracle VM Manager is to use a Web server. That's why we configured an Apache Web server on the Oracle VM Manager.

    $ scp OVM_OL6U2_X86_11203RAC_PVM-1of2.tgz root@
    $ scp OVM_OL6U2_X86_11203RAC_PVM-2of2.tgz root@


    • The root password is ovsroot.
    • scp is available only on Linux, Oracle Solaris, and Mac OS. If you are using Windows, you need to use WinSCP (freeware that is not installed by default).
  3. Import the Oracle RAC Template:

    1. In Oracle VM Manager, go to the Repositories tab.
    2. Expand Repositories and myrepo (the repository previously created) by clicking icon.
    3. Select VM Templates.
    4. Click icon.

      Figure 2

      Figure 2

    5. Enter the two URLs of the files to be imported:

      Figure 3

      Figure 3

    6. Click OK to start the import.

      Depending on your hardware configuration, the import may take about 30 minutes.

      • The import consists of two steps: download and unpacking.
      • You can follow progress in the Jobs summary panel.
      Figure 4

      Figure 4

Exercise 2: Create Two Virtual Disks to Be Used by Future VMs

Oracle RAC databases will be stored on shared storage (shared between two VMs we will create later). In this step, we will create two shared virtual disks to be used later as shared storage by Oracle RAC.

Note: By default, the Oracle RAC template needs five virtual disks. Here, we will change this to save time.

  1. Go to the Repositories tab.
  2. Expand Repositories and myrepo.
  3. Click Virtual Disks.
  4. Click icon (in the right panel, next to icon).
  5. Enter the following parameters and then click OK to create a virtual disk:

    1. For Virtual Disk Name, enter ASM1.
    2. For Size, enter 2.0 GB.
    3. Select Shareable.
    4. For Allocation Type, select Sparse Allocation.
    Figure 5

    Figure 5

  6. Repeat this exercise to create a second virtual disk, ASM2.

Exercise 3: Create a Virtual Network for Oracle RAC

  1. Go to the Networking tab.

    Figure 6

    Figure 6

    Note: Two new networks (xenbr0 and xenbr1) were created during the Oracle RAC template import. Those networks can be used in Oracle VM 2.x. In Oracle VM 3.1, we will use other networks.

  2. Click icon to create a new network.
  3. Select Create a network with bonds/ports only.

    Figure 7

    Figure 7

  4. Name the network private_rac and select Virtual Machine; then click Next and Finish.

    Figure 8

    Figure 8

  5. Select the server and add it to the Selected Servers panel; then click Next.

    Figure 9

    Figure 9

  6. Select the available port eth1 and add it to the Selected Ports panel.

    Figure 10

    Figure 10

    You should now see our new network in the list, as shown in Figure 11.

    Figure 11

    Figure 11

Exercise 4: Change the Network Configuration of the Template

By default, the Oracle RAC template uses Oracle VM 2.x networks (xenbr0 and xenbr1). We need to change the Oracle RAC template to use the network as the public network (first VNIC) and to use private_rac as the Oracle RAC network (second VNIC).

  1. In the Oracle VM Manager console, go to the Repositories tab.
  2. Expand Repositories and myrepo.
  3. Click VM Templates.
  4. In the right panel, select OVM_OL62_X86_64_11203RAC_PVM-1of2.
  5. Click icon to edit the template.
  6. Select the Networks tab.
  7. Change the networks:

    1. Remove xenbr0 and xenbr1 from the Selected Ethernet Network panel.
    2. Add as the first VNIC to the Selected Ethernet Network panel.
    3. Add private_rac as the second VNIC to the Selected Ethernet Network panel.
    4. Click OK.

    Note: The order is important; ensure is listed first and private_rac is listed second, as shown in Figure 12.

    Figure 12

    Figure 12

Exercise 5: Create Two Virtual Machines from the Template

  1. In the Oracle VM Manager console, go to the Servers and VMs tab.
  2. Expand the server pool named mypool.
  3. Right-click the server, and then click Create Virtual Machine.

    Figure 13

    Figure 13

  4. Select Clone from an existing VM Template and enter the following information:

    1. For Clone Count, choose 2.
    2. For Repository, select myrepo.
    3. For VM Template, select OVM_OL6U2_X86_64_11203RAC_PVM-1of2.tgz.
    4. For VM Name, enter rac (suffixes .0 and .1 will be added to get the name of the two VMs resulting in the creation of rac.0 and rac.1).
    5. For Server Pool, select mypool.
    Figure 14

    Figure 14

  5. Click Finish to start the VM creation.

    Note: The VM creation should occur almost immediately since the repository uses OCFS2 file system and the reflink feature. This avoids copying all blocks of the template files, and instead uses pointers to existing blocks in the new files.

    You should now see two VMs named rac.0 and rac.1 under mypool-> in Perspective view, as shown in Figure 15.

    Figure 15

    Figure 15

  6. Edit both VMs (rac.0 and rac.1) to check that network interfaces are in the correct order ( first and private_rac second):

    1. Select rac.0 and click icon.

      Figure 16

      Figure 16

    2. Go to the Networks tab and check the order of the interfaces. The order should be correct (see Figure 17) for this VM; if it is not, change the order.

      Figure 17

      Figure 17

    3. Repeat the same actions for VM rac.1. If private_rac is listed first, change it by moving to the upper position, as shown in Figure 18.

      Figure 18

      Figure 18

    4. Click OK.

Exercise 6: Add Shared Storage to the Two VMs

  1. Select VM rac.0 and click icon to edit the VM.
  2. Click the Disks tab.
  3. In the line corresponding to slot 2, select Virtual Disk.
  4. Click icon to select an existing virtual disk.
  5. Choose ASM1 and click OK.
  6. Repeat Step 3 through Step 5 to add virtual disk ASM2 to slot 3.

    Figure 19

    Figure 19

  7. Repeat Step 1 through Step 6 to add the two virtual disks to the second VM (rac.1).

Exercise 7: Deploy a Two-Node Oracle RAC Cluster Using the Deploycluster Tool

The Deploycluster tool is an optional tool that will help us configure the Oracle RAC cluster on the two VMs.

  1. Copy the Deploycluster tool to Oracle VM Manager using the following command:

    $ scp root@
  2. Log on to the Oracle VM Manager's Oracle VM VirtualBox virtual machine:

    $ ssh root@ 
  3. Unzip the Deploycluster tool in /u01/app/oracle:

    # cd /u01/app/oracle
    # unzip 
  4. Open the console for VM rac.0 (select VM rac.0 and click icon).

    Figure 20

    Figure 20

  5. Open the console for VM rac.1.
  6. Create the netconfig.ini and params.ini files in /u01/app/oracle and then deploy the cluster on the two VMs:

    1. First, use the content shown in Listing 1 to create the /u01/app/oracle/netconfig.ini file:

      # Node specific information
      # Common data
      # Device used to transfer network information to second node
      # in interview mode
      # 11gR2 specific data

      Listing 1. Contents of netconfig.ini File

    2. Then copy the file /u01/app/oracle/deploycluster/utils/params-sample.ini to /u01/app/oracle/params.ini and modify the following two lines:

      ALLDISKS="/dev/xvdc /dev/xvdd"
    3. Run the following command on one line:

      # deploycluster/ -u admin -p Welcome1 -M rac.0,rac.1 -N ./netconfig.ini -P ./params.ini

      Note: This command will first start the two VMs and launch the Oracle RAC configuration in the background.

  7. Check the progress of the configuration on the first Oracle RAC node (rac.0) in the log file /u01/racovm/buildcluster.log:

    1. Open a new terminal window.
    2. Run the following command (log on to the rac.0 VM with password ovsroot):

      $ ssh root@
    3. Run the following command:

      # tail -f /u01/racovm/buildcluster.log

    Oracle RAC deployment on both nodes might take about 45 minutes. In a physical environment that has recent x86 hardware, deployment should be complete within 30 minutes.

    At the end of the deployment, you should have a two-node Oracle RAC cluster.


This concludes this Part 2 hands-on lab. If you want to go further, see the lab in Part 3 of this series, "Deploying a Cloud Infrastructure with Oracle VM 3.x and the Sun ZFS Storage Appliance," in which we will repeat all the operations from Part 1 using Oracle's Sun ZFS Storage Appliance Simulator (shared storage system) and also Oracle VM's Storage Connect feature (which enables the storage system to be managed directly from the Oracle VM Manager).

See Also

About the Authors

Christophe Pauliat and Olivier Canonge are Systems Sales Consultants for Oracle in France.


Special thanks to Kris Bakke, Doan Nguyen, Honglin Su, Simon Coter, Eric Bezille, Michel Kintz, and Greg King for their contributions.

Revision 1.0, 02/03/2013

facebook banner twitter banner