1
Oracle VM – Lab 2 Virtualize and Deploy Oracle Applications in Minutes with Oracle VM: Hands-On Lab This hands-on lab is for application architects or system administrators who will need to deploy and manage Oracle Applications. You’ll learn how Oracle VM Templates can turn you into a power user who can virtualize and deploy complex Oracle Applications in minutes. Longtime field-experienced engineers and product experts will show you, step by step, how to download and import templates and deploy the applications. This lab represents part 2 of a global lab. Part 1 is represented by Oracle VM Lab 1 and will take place just before this lab. Note: This lab builds on top of Oracle VM Lab 1. It is strongly recommended that you attend Lab 1 and prepare all downloads for both Labs 1 and 2 prior to attending this lab
Lab Authors: Olivier Canonge Systems sales consultant, Oracle France [email protected]
Christophe Pauliat Systems sales consultant, Oracle France [email protected]
Simon Coter Technical expert in core technology, Oracle Italy. [email protected]
Eric Bezille Chief Technologist, Oracle France. [email protected]
2
CONTENTS 1 Lab objective ................................................................................................................................... 3
2 Minimal configuration to run this lab ............................................................................................... 3
3 Important notes ............................................................................................................................... 4
4 Preparation (MUST be done before LAB) ....................................................................................... 4
4.1 Download required products ................................................................................................... 4
5 Global Lab Architecture ................................................................................................................... 5
6 Start of the Lab ................................................................................................................................ 6
6.1 Creation of Oracle VM Manager and Oracle VM Server ........................................................ 6
6.2 Create 2 virtual disks to be used by future vms ...................................................................... 9
6.3 Create a virtual network for Oracle RAC ............................................................................... 10
6.4 Change network configuration of the template ..................................................................... 12
6.5 Create 2 virtual machines from the template ........................................................................ 13
6.6 Add the shared storage to the 2 vms .................................................................................... 16
6.7 Deploy a 2 node Oracle RAC cluster using the deploycluster tool ....................................... 17
7 References: ................................................................................................................................... 19
7.1 Oracle VM documentation ..................................................................................................... 19
7.2 Oracle RAC template documentation ................................................................................... 19
7.3 This document ....................................................................................................................... 19
Last updated: December 17
th, 2012
Authors: Christophe Pauliat / Olivier Canonge Special thanks to Kris Bakke, Doan Nguyen, Honglin Su, Simon Coter, Eric Bezille, Saar Maoz and
Greg King
3
1 LAB OBJECTIVE The objective of this lab is to demonstrate how Oracle VM templates provide an easy and fast way of deploying Oracle Applications. During this session, you are going to deploy a 2 nodes Oracle RAC cluster using Oracle RAC templates. Those templates are designed to build test or production clusters of any number of nodes, while by default a 2-node cluster is created. Oracle RAC is an option to the award-winning Oracle Database Enterprise Edition. Oracle RAC is a cluster database with a shared cache architecture that overcomes the limitations of traditional shared-nothing and shared-disk approaches to provide highly scalable and available database solutions for all your business applications. Oracle RAC is a key component of the Oracle Enterprise grid architecture.
This document details all actions that we will be run during the Oracle Virtual Sys Admin day Lab 2 on Tuesday January 15th, 2013 (Track 3)
2 MINIMAL CONFIGURATION TO RUN THIS LAB This document can be used to run the lab at home or at your office on your own laptop/desktop/server machine (in this case, you will need to run Oracle VM Lab 1 first to build the needed environment) Reminder: Oracle VM VirtualBox Oracle VM VirtualBox is a free and widely used desktop virtualization tool. It is installed on an X86 operating system (OS). VirtualBox is available on all the majors X86 OS (Windows XP, Windows 7, Windows xx, many Linux distributions, Apple MacOS and Solaris 10 & 11). In this lab, we use VirtualBox to create 3 virtual machines that will later be used by Oracle VM for X86 and the ZFS storage appliance simulator, so that we can install all software components on a single physical machine. Since Oracle VM VirtualBox is available on many X86 Operating Systems, the native operating system on the laptop/desktop/server machine may be any of these. Yet, all operations were only tested on Oracle Linux 6 update 3 On Linux/Solaris/MacOS, we will use ssh and scp to connect or transfert files On Windows, you will need additional tools like Putty and WinSCP NOTE: The minimal configuration needed for your laptop/desktop/server for this lab:
o 16 GB of memory o X86 quad thread processor (quad core, or dual core dual thread) from Intel or AMD o 37 GB of disk space to store the files needed to start the lab o 50 GB of disk space to store the files that will be created during the lab.
4
3 IMPORTANT NOTES Acronyms:
In the present document, we will use the following acronyms: o OVM for “Oracle VM for X86” o VM for “virtual machine”
2-layer virtualization:
In this lab, 2 layers of virtualization are used to limit the number of physical machine to 1: o Oracle VM VirtualBox aka VirtualBox o Oracle VM for X86 aka OVM
Templates 2 kinds of templates are used: VirtualBox templates and OVM templates, so be careful not to be confused
4 PREPARATION (DONE BEFORE LAB)
4.1 DOWNLOAD REQUIRED PRODUCTS For the purpose of this lab and to save time, you will have to download these files, they must already on your laptop in /home/ouser/OOW_LAB/LAB2_HOL9559 directory to proceed with the lab
- Oracle VM template for Oracle Database RAC 11.2.0.3.2 + Oracle Linux 6.2 (32 bits)
(Paravirtualized)
o http://www.oracle.com/technetwork/database/clustering/overview/rac-template-
11grel2-166623.html
o There is also a 64 bit version of the template, here we will use the 32 bits version
to save a few minutes during deployment
o 2 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)
o This optional tool helps RAC template deployment.
o http://www.oracle.com/technetwork/database/clustering/overview/rac-template-
11grel2-166623.html
o 1 File
RACOVM-Deploycluster-tool.zip (5 MB)
MD5 checksum: 1dc5f0815ab2c11e0f8239735d409996
- Files to easily and quickly rebuild Oracle VM configuration
o 2 files
lab2_hol9559.ova (3.4 GB)
MD5 checksum: a5d03374cbd1daed755766a6b3057921
repo.vdi (12 GB)
MD5 checksum: d4d500b63da5d56b0be77dbd71851465
5
5 GLOBAL LAB ARCHITECTURE The following picture shows all the components (VirtualBox VMs and Oracle VM VMs) with their names and configurations (memory, IP address, ...)
6
6 START OF THE LAB
6.1 CREATION OF ORACLE VM MANAGER AND ORACLE VM SERVER
Here, we will recreate the Oracle VM Manager and Servers VirtualBox VMs using an existing repository which already contains the RAC template to save time.
a) In the VirtualBox console, recreate Oracle VM Manager and Oracle VM Server VMs by
importing a new .ova file
o Go to File>Import Appliance and select the file
/home/ouser/OOW_HOL/LAB2_HOL9559/lab2_hol9559.ova
o Click on Next
o Change the name for Virtual System 1 from ovm-mgr to HOL9559_ovm-mgr
You need to double-click on ovm-mgr and to change the name
o Change the name for Virtual System 2 from ovm-srv to HOL9559_ovm-srv
You need to double-click on ovm-srv to change the name
o Click on Import to launch the import
o This should take approximately 3 minutes
o You should now see 2 VirtualBox VMs named HOL9559_ovm-srv and HOL9559_ovm-
mgr
b) In the VirtualBox console, add a new VirtualBox virtualdisk to HOL9559_ovm-srv
o Select the VM named HOL9559_ovm-srv
o Click on the icon
o Go to Storage, and select “Sata Controller”
o Click on the icon to add a new disk
o Click on “Choose Existing disk” and select the file
/home/ouser/OOW_HOL/LAB2_HOL9559/repo.vdi
c) In the VirtualBox console, start the 2 VMs named HOL9559_ovm-srv and HOL9559_ovm-
mgr (you can start both VMs in parallel)
d) Wait for the VM HOL9559_ovm-mgr to be ready (when Gnome Desktop displayed) (about 2
minutes)
e) Opens the Oracle VM Manager admin console o Open a new web browser on your physical machine native OS (Firefox during OpenWorld
session) and open URL http://192.168.56.3:7001/ovm/console) o Log in using user “admin” and password “Welcome1”
f) We now need to remove and discover again the OVM Server to solve a minor problem due to the way we used VirtualBox o In the “Servers and VMs” tab, expand the “Server Pools” and the pool my pool by
clicking on the icons
o Right click on the server ovm-srv.oow.com and click on Delete
o Click on OK in the confirmation Window
7
o Click on the icon
- Leave 8899 for the Oracle VM Agent Port
- Enter “ovsroot” for the Oracle VM Agent Password
- Enter “192.168.56.2” for the IP Address of the ovm server
- Click OK to launch the discovery
o Wait a few seconds for the discovery job to finish
o You should now see the server ovm-srv.oow.com already in the mypool server pool
o Select the server ovm-srv.oow.com and select “Physical Disks” in Perspective
o You should see the 100 GB hdd we added (repo.vdi)
g) We now need to discover the storage repository we created on this 100GB disk before the lab session. o Go to the “Storage” tab, and click on Local File Systems
o Select the 100 GB filesystem and click on the icon to refresh this filesystem o Select the server ovm-srv.oow.com to run this refresh task
o After this refresh, you should see the repository named myrepo in this window
o Go to “Repositories” tab, you should see the repository but not yet its content (nothing in VM templates)
o Select the repository myrepo and click on icon to present this repository to the OVM Server ovm-srv.oow.com
8
o On the next window, click on to select all servers (here only 1), and click on Finish
o Select the repository myrepo and click on icon to refresh this repository
o You should now see the RAC template named OVM_OL6U2_X86_11203RAC_PVM-1of2.tgz in “VM Templates”
9
6.2 CREATE 2 VIRTUAL DISKS TO BE USED BY FUTURE VMS Oracle RAC databases will be stored on shared storage (shared between 2 VMs we will create later). In this step, we will create 2 shared virtual disks to be used later as shared storage by RAC. Note: by default, the RAC template needs 5 virtual disks. Here, we will change this to save time.
a) Go to the “Repositories” tab
b) Expand “Repositories” and “myrepo”
c) Click on “Virtual Disks”
d) Click on icon (in the Right window, next to icon )
e) Enter the following parameters and click OK to create the virtual disk
o name ASM1
o Size 2GB
o Shareable
o With sparse allocation
f) Repeat this operation to create a second virtual disk ASM2
10
6.3 CREATE A VIRTUAL NETWORK FOR RAC
a) Go to the “Networking” tab
Note:
- 2 new networks (xenbr0 and xenbr1) were created during RAC template import.
- Those networks may be used in Oracle VM 2.x.
- In Oracle VM 3.1, we will used other networks
Click on icon to create a new network
Select “Create a network with bonds/ports only”
Name it “private_rac” with “Virtual Machine” capabilities, then click “Next” and "Finish"
11
Select the server “ovm-srv.oow.com” and add to "Selected Servers" then click “Next”
Select "Available port eth1" and add it to "Selected Ports"
You should now see our new network in the list.
12
6.4 CHANGE NETWORK CONFIGURATION OF THE TEMPLATE
By default, the Oracle RAC template use Oracle VM 2.x networks (xenbr0 and xenbr1) We need to change the RAC template to use 192.68.56.0 network as the public network (1
st
VNIC) and “private_rac” as the RAC network (2nd
VNIC)
a) In Oracle VM Manager web console, go to “Repositories” Tab
b) Expand “Repositories” and “myrepo”
c) Click on “VM Templates”
d) In the right window, select OVM_OL62_X86_64_11203RAC_PVM-1of2
e) Click on icon to edit the template
f) Select tab Networks
g) Change the networks
o Remove xenbr0 and xenbr1 from "Selected Ethernet Network"
o add 192.168.56.0 as the 1st VNIC to "Selected Ethernet Network"
o add private_rac as the 2nd
VNIC to "Selected Ethernet Network"
o Click on OK
The order is important, have 192.168.56.0 first and private_rac second
13
6.5 CREATE 2 VIRTUAL MACHINES FROM THE TEMPLATE
a) In Oracle VM Manager web console, go to “Servers and VMs” Tab
b) Expand the server pool named “mypool”
c) Right click on the server "ovm-srv.oow.com", then click on “Create Virtual Machine”
d) Select “Clone from an existing VM Template” and enter the following information
o Choose “2” for “Clone count”
o Select “myrepo” as the repository
o Select OVM_OL6U2_X86_64_11203RAC_PVM-1of2.tgz as the VM Template
o Enter “rac” for the VM Name (suffixes .0 and .1 will be added to get the name of the 2
VMs resulting in creation of rac.0 and rac.1)
o Select “mypool” as the Server pool
14
e) Click finish to start VM creation
Note: Immediate VM creation on OCFS2 The VMs creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature. This avoids copying all blocks of the Template files, but instead uses pointers to existing blocks in the new files (see details on the OCFS2 reflink feature on https://blogs.oracle.com/wim/entry/ocfs2_reflink)
f) You should now see 2 VMs named rac.0 and rac.1 under mypool->ovm-srv.oow.com in
Virtual Machines Perspective view
g) Select and edit both VM (rac.0 and rac.1) to check that network interfaces are in the correct
order (192.168.56.0 first and private_rac second)
o Select rac.0 and click on
o Go to networks tab and check interfaces order
15
o Order should be correct for this VM, if not correct change the order by clicking on the
up arrow (move up)
o Repeat Step for VM rac.1
If private_rac is first, change by moving 192.168.56.0 to upper position
Result is :
Click OK.
16
6.6 ADD THE SHARED STORAGE TO THE 2 VMS
o Select VM rac.0 and click on icon to edit the VM
o Click on tab “Disks”
o In line corresponding to slot 2, select “Virtual Disk”
o Click on icon to select an existing virtual disk
o Choose ASM1 and click OK
o Repeat steps c) to e) to add virtual disk ASM2
o Repeat steps a to f to add the 2 virtual disks to the second VM (rac.1)
17
6.7 DEPLOY A 2 NODE RAC CLUSTER USING THE DEPLOYCLUSTER TOOL
Reminder: the deploycluster tool is an optional tool that will help us configure RAC cluster on the 2 VMs.
a) Open a terminal on your Oracle Linux desktop and
Copy the deploycluster tool and the needed netconfig.ini and params.ini files
(already created to save time) to the OVM Manager according to the following instructions :
$ cd ~/OOW_HOL/LAB2_9559/
$ scp RACOVM-Deploycluster-tool.zip [email protected]:/u01/app/oracle
$ scp *.ini [email protected]:/u01/app/oracle
b) Log on the Oracle VM Manager VirtualBox VM
$ ssh [email protected]
c) Unzip the deploycluster tool in /u01/app/oracle
# cd /u01/app/oracle
# unzip RACOVM-Deploycluster-tool.zip
d) Open Console for VM rac.0 (select VM rac.0 and click on icon )
e) Open Console for VM rac.1
f) Deploy the cluster on the 2 VMs by running the following command on one line :
# deploycluster/deploycluster.py -u admin -p Welcome1 -M rac.0,rac.1 -N ./netconfig.ini –P ./params.ini
Notes:
- This command will first start the 2 VMs and launch the RAC configuration in
background
- Normally, you have to create the netconfig.ini file (using example in
deploycluster/utils)
- The files netconfig.ini fand params.ini were created before to save time. See
content of those files below
18
netconfig.ini
# 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
params.ini (only the lines that were modified from the original file)
ALLDISKS="/dev/xvdc /dev/xvdd"
ASM_MIN_DISKS=2
f) Progress of the configuration can be seen on the 1st RAC node (rac.0) in log file
/u01/racovm/buildcluster.log
o Open a new terminal
o $ ssh [email protected] (log on rac.0 VM with password ovsroot)
o # tail –f /u01/racovm/buildcluster.log
g) RAC deployment on both nodes is going to take around 45 minutes. On a physical
environment with recent X86 hardware, deployment should complete within 30 minutes
At the end of the deployment, you should get a 2 nodes RAC cluster.
19
7 REFERENCES:
7.1 ORACLE VM DOCUMENTATION http://www.oracle.com/technetwork/server-storage/vm/documentation/index.html
7.2 ORACLE RAC TEMPLATE DOCUMENTATION http://www.oracle.com/technetwork/database/clustering/overview/rac-template-11grel2-166623.html
7.3 THIS DOCUMENT This document can be found on http://blogs.oracle.com/cpauliat/HOL_OOW2012
Top Related