by Christophe Pauliat and Olivier Canonge
Published February 2013
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
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:
In addition, two kinds of templates are used, so pay close attention to the instructions to ensure you use the right templates:
The minimal configuration needed for your laptop, desktop, or server is as follows:
Download the following:
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
RACOVM-Deploycluster-tool.zip(5 MB), MD5 checksum 1dc5f0815ab2c11e0f8239735d409996.
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).
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.
In Part 1, we created two virtual machines in Oracle VM VirtualBox:
/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 firstname.lastname@example.org:/var/www/html/files $ scp OVM_OL6U2_X86_11203RAC_PVM-2of2.tgz email@example.com:/var/www/html/files
scpis 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).
Depending on your hardware configuration, the import may take about 30 minutes.
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.
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.
You should now see our new network in the list, as shown in Figure 11.
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 184.108.40.206 network as the public network (first VNIC) and to use private_rac as the Oracle RAC network (second VNIC).
Note: The order is important; ensure 192.168.56.0 is listed first and private_rac is listed second, as shown in Figure 12.
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-> ovm-srv.oow.com in Perspective view, as shown in Figure 15.
The Deploycluster tool is an optional tool that will help us configure the Oracle RAC cluster on the two VMs.
$ scp RACOVM-Deploycluster-tool.zip firstname.lastname@example.org:/u01/app/oracle
$ ssh email@example.com
# cd /u01/app/oracle # unzip RACOVM-Deploycluster-tool.zip
/u01/app/oracleand then deploy the cluster on the two VMs:
# Node specific information NODE1=rac0 NODE1IP=192.168.56.100 NODE1PRIV=rac0-priv NODE1PRIVIP=10.0.0.100 NODE1VIP=rac0-vip NODE1VIPIP=192.168.56.101 NODE2=rac1 NODE2IP=192.168.56.110 NODE2PRIV=rac1-priv NODE2PRIVIP=10.0.0.110 NODE2VIP=rac1-vip NODE2VIPIP=192.168.56.111 # Common data PUBADAP=eth0 PUBMASK=255.255.255.0 PUBGW=192.168.56.1 PRIVADAP=eth1 PRIVMASK=255.255.255.0 RACCLUSTERNAME=racoow DOMAINNAME=oow.com DNSIP= # Device used to transfer network information to second node # in interview mode NETCONFIG_DEV=/dev/xvdc # 11gR2 specific data SCANNAME=rac01-scan SCANIP=192.168.56.200
Listing 1. Contents of
/u01/app/oracle/params.iniand modify the following two lines:
ALLDISKS="/dev/xvdc /dev/xvdd" ASM_MIN_DISKS=2
# deploycluster/deploycluster.py -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.
$ ssh firstname.lastname@example.org
# 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).
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|