oracle vm lab 3 x86 enterprise cloud infrastructure with oracle vm

41
1 Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM 3.x and Sun ZFS Storage Appliance The purpose of this hands-on lab is to demonstrate the functionality and usage of Oracle’s enterprise cloud infrastructure (ECI) for x86 with Oracle VM 3.x. It covers : • Creation of VMs • Quick and easy deployment of Oracle applications with Oracle VM Templates • Usage of the Storage Connect plug-in for the Sun ZFS Storage Appliance Oracle VM technology along with the associated Oracle ZFS Storage Appliance are 2 keys components of the Oracle Enterprise Cloud Infrastructure, as well as the new release of Oracle Exalogic Engineered System. 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]

Upload: others

Post on 12-Sep-2021

45 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

1

Oracle VM ndash Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM 3x and Sun ZFS Storage Appliance The purpose of this hands-on lab is to demonstrate the functionality and usage of Oraclersquos enterprise cloud infrastructure (ECI) for x86 with Oracle VM 3x It covers bull Creation of VMs bull Quick and easy deployment of Oracle applications with Oracle VM Templates bull Usage of the Storage Connect plug-in for the Sun ZFS Storage Appliance Oracle VM technology along with the associated Oracle ZFS Storage Appliance are 2 keys components of the Oracle Enterprise Cloud Infrastructure as well as the new release of Oracle Exalogic Engineered System

Authors Olivier Canonge Systems sales consultant Oracle France oliviercanongeoraclecom

Christophe Pauliat Systems sales consultant Oracle France christophepauliatoraclecom

Simon Coter Technical expert in core technology Oracle Italy simoncoteroraclecom

Eric Bezille Chief Technologist Oracle France ericbezilleoraclecom

2

CONTENTS

1 Lab objective 3

2 Minimal configuration to run this lab 3

3 Important notes 4

4 Preparation (done before LAB) 4

41 Download required products 4

42 Install Primary OS and VirtualBox 4

5 Summary of steps 6

6 Global picture 6

7 Step 1 Install ovm server amp ovm manager 7

71 Create a virtualBox VM by importing the VirtualBox Template for Oracle VM Server 7

72 Start and configure the Oracle VM Server 8

73 Create a virtualBox VM by importing the VirtualBox Template for Oracle VM Manager 10

74 Start and configure the Oracle VM Manager vm 10

8 Step 2 Install zfs storage appliance 11

81 Create a VirtualBox VM for the ZFS SA simulator 11

82 Start and configure the ZFS SA simulator VirtualBox VM 14

83 Create an iSCSI target and iSCSI group on the ZFS SA dedicated to OVM 19

84 Install the storage connect plug-in for ZFS SA 22

9 Step 3 OVM operations 23

91 Discover the OVM server in OVM manager 23

92 Configure OVM networks 24

93 Discover the ZFS SA in OVM Manager using the storage connect plug-in 25

94 Create 2 Luns on the ZFS SA from the OVM Manager 27

95 Create a clustered server pool 30

96 Create a storage repository on the ZFS SA LUN 32

97 Notes on PVMHVM VMs and Templates 34

98 Setup an http web server for ISO Templateshellip 35

99 Import Oracle Linux 5u7 PVM template 36

910 Create an OVM VM from the ovm template 38

911 Start the OVM VM guest-vm 40

10 References 41

101 Oracle VM documentation 41

102 Oracle VM for X86 white papers 41

103 This document 41

Authors Christophe Pauliat Olivier Canonge Last update September 26th 2012

Special thanks to Kris Bakke Doan Nguyen Honglin Su Simon Coter Eric Bezille Michel Kintz Eric Grasland Christophe Lesbats and Greg King

3

1 LAB OBJECTIVE This hands-on lab takes you through the planning and deployment of a cloud infrastructure with Oracle VM as the foundation It covers a range of topics from planning storage capacity LUN creation network bandwidth planning and best practices to designing and streamlining the environment for ease of management Learn from deeply experienced field engineers and product experts

During this lab we will create an Oracle VM for X86 demo environment on a single laptop machine using Oracle VM VirtualBox This document details all actions that we will be run during the Oracle Virtual Sys Admin day Oracle VM Lab 3 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 laptopdesktopserver machine 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 amp 11) In this lab we use VirtualBox to create 3 virtual machines one for the OVM server one for the OVM Manager and one for the ZFS storage appliance simulator This allows you to 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 laptopdesktopserver machine may be any of these However all operations were only tested on Oracle Linux 6 update 3 On LinuxSolarisMacOS we will use ssh and scp to connect or transfert files On Windows you will need additional tools like Putty and WinSCP The minimal configuration needed for your laptopdesktopserver is

o 8 GB of memory o X86 quad thread processor (quad core or dual core dual thread) from Intel or AMD o 15 GB of disk space to store the files needed to start the lab o 15 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 ldquoOracle VM for X86rdquo o VM for ldquovirtual machinerdquo

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 (MUST BE DONE BEFORE LAB)

41 DOWNLOAD REQUIRED PRODUCTS

- Oracle VM VirtualBox latest version (4118 at this time) (about 90 MB) o httpswwwvirtualboxorgwikiDownloads o Download both the version for your OS and the extension pack (very small

common to all platforms) - Virtualbox template for Oracle VM Server 311 buil 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 buil 365 (315 GB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html

- Virtualbox template for Oracle Storage Appliance Simulator (vbox-2011100118) o httpwwworaclecomwebappsdialoguensdlgwelcomejspp_ext=Yampp_dlg_id=

10521841ampsrc=7299332ampAct=45

o File SunStorageVBoxzip (709 MB)

- Oracle VM storage connect plug-in for Oracle ZFS Storage Appliance (v101) o httpwwworaclecomtechnetworkserver-storagesun-unified-

storagedownloadszfssa-plugins-1489830html

o This plug-in enables ZFS SA storage to be provisioned directly from the Oracle

VM Manager administration console

o 1 File (900 KB)

ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip

- Oracle VM template for Oracle Linux 5 update 7 (Paravirtualized) o httpsedeliveryoraclecomoraclevm

o File OVM_OL5U7_X86_64_PVM_10GBtgz (815 GB) o Gunzip the file to save time during the Lab (new size 244 GB)

- Oracle Java JRE 7u4 for Linux RPM X64 (64 bits version) o httpjavacomendownloadmanualjsp o File jre-7u4-linux-x64rpm (20 MB)

42 INSTALL PRIMARY OS AND VIRTUALBOX

5

- Install a 64 bit OS on your laptopdesktop system supported by Oracle VirtualBox o In our case Oracle Linux 6u3 64bits (unbreakable kernel installed by default) o 64 bits is mandatory to manage more than 4 GB of RAM

- Install VirtualBox and the extension pack o In our case version 4118 o To install the extension pack run VirtualBox then go to File Preferences

Extensions and click on the icon

- Configure a VirtualBox Host Only network (in VirtualBox go to File Preferences Network) o Network address 192168560 o Laptop IP 192168561 o Netmask 2552552550 o Disable the DHCP server since we will not use it o Open a terminal on your physical machine

- Installation Oracle Java JRE 7 on your physical machine o $ su -

rpm ndashivh jre-7u4-linux-x64rpm

o Restart your web browser

6

5 SUMMARY OF STEPS

In this labwe will execute the following steps 1) Install Oracle VM Server 311 in a VirtualBox VM from a VirtualBox template (ova file) 2) Install Oracle VM Manager 311 in a VirtualBox VM from a VirtualBox template 3) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 4) Install the ZFS SA storage connect plugin in Oracle VM 5) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Discover the ZFS SA d Create 2 ZFS SA luns from OVM admin console e Create a clustered server pool using 1

st ZFS SA LUN

f Create a storage repository using the 2nd

ZFS SA LUN g Import an Oracle VM template in the repository h Create a Oracle VM virtual machine based on the imported template

6 GLOBAL PICTURE The following picture shows all the components (VirtualBox VMs and OVM VMs) with their names and configuration (memory IP address hellip)

At the beginning of this lab only the physical laptop is installed with Oracle Linux 6 update 3 + VirtualBox + Java JRE (blue rectangle) You will create the VirtualBox and OVM virtual machines during the lab using the steps described in this document At the end of this lab you will have a complete running testing platform for Oracle VM using ZFS SA iSCSI shared storage

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 2: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

2

CONTENTS

1 Lab objective 3

2 Minimal configuration to run this lab 3

3 Important notes 4

4 Preparation (done before LAB) 4

41 Download required products 4

42 Install Primary OS and VirtualBox 4

5 Summary of steps 6

6 Global picture 6

7 Step 1 Install ovm server amp ovm manager 7

71 Create a virtualBox VM by importing the VirtualBox Template for Oracle VM Server 7

72 Start and configure the Oracle VM Server 8

73 Create a virtualBox VM by importing the VirtualBox Template for Oracle VM Manager 10

74 Start and configure the Oracle VM Manager vm 10

8 Step 2 Install zfs storage appliance 11

81 Create a VirtualBox VM for the ZFS SA simulator 11

82 Start and configure the ZFS SA simulator VirtualBox VM 14

83 Create an iSCSI target and iSCSI group on the ZFS SA dedicated to OVM 19

84 Install the storage connect plug-in for ZFS SA 22

9 Step 3 OVM operations 23

91 Discover the OVM server in OVM manager 23

92 Configure OVM networks 24

93 Discover the ZFS SA in OVM Manager using the storage connect plug-in 25

94 Create 2 Luns on the ZFS SA from the OVM Manager 27

95 Create a clustered server pool 30

96 Create a storage repository on the ZFS SA LUN 32

97 Notes on PVMHVM VMs and Templates 34

98 Setup an http web server for ISO Templateshellip 35

99 Import Oracle Linux 5u7 PVM template 36

910 Create an OVM VM from the ovm template 38

911 Start the OVM VM guest-vm 40

10 References 41

101 Oracle VM documentation 41

102 Oracle VM for X86 white papers 41

103 This document 41

Authors Christophe Pauliat Olivier Canonge Last update September 26th 2012

Special thanks to Kris Bakke Doan Nguyen Honglin Su Simon Coter Eric Bezille Michel Kintz Eric Grasland Christophe Lesbats and Greg King

3

1 LAB OBJECTIVE This hands-on lab takes you through the planning and deployment of a cloud infrastructure with Oracle VM as the foundation It covers a range of topics from planning storage capacity LUN creation network bandwidth planning and best practices to designing and streamlining the environment for ease of management Learn from deeply experienced field engineers and product experts

During this lab we will create an Oracle VM for X86 demo environment on a single laptop machine using Oracle VM VirtualBox This document details all actions that we will be run during the Oracle Virtual Sys Admin day Oracle VM Lab 3 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 laptopdesktopserver machine 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 amp 11) In this lab we use VirtualBox to create 3 virtual machines one for the OVM server one for the OVM Manager and one for the ZFS storage appliance simulator This allows you to 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 laptopdesktopserver machine may be any of these However all operations were only tested on Oracle Linux 6 update 3 On LinuxSolarisMacOS we will use ssh and scp to connect or transfert files On Windows you will need additional tools like Putty and WinSCP The minimal configuration needed for your laptopdesktopserver is

o 8 GB of memory o X86 quad thread processor (quad core or dual core dual thread) from Intel or AMD o 15 GB of disk space to store the files needed to start the lab o 15 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 ldquoOracle VM for X86rdquo o VM for ldquovirtual machinerdquo

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 (MUST BE DONE BEFORE LAB)

41 DOWNLOAD REQUIRED PRODUCTS

- Oracle VM VirtualBox latest version (4118 at this time) (about 90 MB) o httpswwwvirtualboxorgwikiDownloads o Download both the version for your OS and the extension pack (very small

common to all platforms) - Virtualbox template for Oracle VM Server 311 buil 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 buil 365 (315 GB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html

- Virtualbox template for Oracle Storage Appliance Simulator (vbox-2011100118) o httpwwworaclecomwebappsdialoguensdlgwelcomejspp_ext=Yampp_dlg_id=

10521841ampsrc=7299332ampAct=45

o File SunStorageVBoxzip (709 MB)

- Oracle VM storage connect plug-in for Oracle ZFS Storage Appliance (v101) o httpwwworaclecomtechnetworkserver-storagesun-unified-

storagedownloadszfssa-plugins-1489830html

o This plug-in enables ZFS SA storage to be provisioned directly from the Oracle

VM Manager administration console

o 1 File (900 KB)

ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip

- Oracle VM template for Oracle Linux 5 update 7 (Paravirtualized) o httpsedeliveryoraclecomoraclevm

o File OVM_OL5U7_X86_64_PVM_10GBtgz (815 GB) o Gunzip the file to save time during the Lab (new size 244 GB)

- Oracle Java JRE 7u4 for Linux RPM X64 (64 bits version) o httpjavacomendownloadmanualjsp o File jre-7u4-linux-x64rpm (20 MB)

42 INSTALL PRIMARY OS AND VIRTUALBOX

5

- Install a 64 bit OS on your laptopdesktop system supported by Oracle VirtualBox o In our case Oracle Linux 6u3 64bits (unbreakable kernel installed by default) o 64 bits is mandatory to manage more than 4 GB of RAM

- Install VirtualBox and the extension pack o In our case version 4118 o To install the extension pack run VirtualBox then go to File Preferences

Extensions and click on the icon

- Configure a VirtualBox Host Only network (in VirtualBox go to File Preferences Network) o Network address 192168560 o Laptop IP 192168561 o Netmask 2552552550 o Disable the DHCP server since we will not use it o Open a terminal on your physical machine

- Installation Oracle Java JRE 7 on your physical machine o $ su -

rpm ndashivh jre-7u4-linux-x64rpm

o Restart your web browser

6

5 SUMMARY OF STEPS

In this labwe will execute the following steps 1) Install Oracle VM Server 311 in a VirtualBox VM from a VirtualBox template (ova file) 2) Install Oracle VM Manager 311 in a VirtualBox VM from a VirtualBox template 3) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 4) Install the ZFS SA storage connect plugin in Oracle VM 5) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Discover the ZFS SA d Create 2 ZFS SA luns from OVM admin console e Create a clustered server pool using 1

st ZFS SA LUN

f Create a storage repository using the 2nd

ZFS SA LUN g Import an Oracle VM template in the repository h Create a Oracle VM virtual machine based on the imported template

6 GLOBAL PICTURE The following picture shows all the components (VirtualBox VMs and OVM VMs) with their names and configuration (memory IP address hellip)

At the beginning of this lab only the physical laptop is installed with Oracle Linux 6 update 3 + VirtualBox + Java JRE (blue rectangle) You will create the VirtualBox and OVM virtual machines during the lab using the steps described in this document At the end of this lab you will have a complete running testing platform for Oracle VM using ZFS SA iSCSI shared storage

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 3: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

3

1 LAB OBJECTIVE This hands-on lab takes you through the planning and deployment of a cloud infrastructure with Oracle VM as the foundation It covers a range of topics from planning storage capacity LUN creation network bandwidth planning and best practices to designing and streamlining the environment for ease of management Learn from deeply experienced field engineers and product experts

During this lab we will create an Oracle VM for X86 demo environment on a single laptop machine using Oracle VM VirtualBox This document details all actions that we will be run during the Oracle Virtual Sys Admin day Oracle VM Lab 3 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 laptopdesktopserver machine 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 amp 11) In this lab we use VirtualBox to create 3 virtual machines one for the OVM server one for the OVM Manager and one for the ZFS storage appliance simulator This allows you to 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 laptopdesktopserver machine may be any of these However all operations were only tested on Oracle Linux 6 update 3 On LinuxSolarisMacOS we will use ssh and scp to connect or transfert files On Windows you will need additional tools like Putty and WinSCP The minimal configuration needed for your laptopdesktopserver is

o 8 GB of memory o X86 quad thread processor (quad core or dual core dual thread) from Intel or AMD o 15 GB of disk space to store the files needed to start the lab o 15 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 ldquoOracle VM for X86rdquo o VM for ldquovirtual machinerdquo

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 (MUST BE DONE BEFORE LAB)

41 DOWNLOAD REQUIRED PRODUCTS

- Oracle VM VirtualBox latest version (4118 at this time) (about 90 MB) o httpswwwvirtualboxorgwikiDownloads o Download both the version for your OS and the extension pack (very small

common to all platforms) - Virtualbox template for Oracle VM Server 311 buil 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 buil 365 (315 GB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html

- Virtualbox template for Oracle Storage Appliance Simulator (vbox-2011100118) o httpwwworaclecomwebappsdialoguensdlgwelcomejspp_ext=Yampp_dlg_id=

10521841ampsrc=7299332ampAct=45

o File SunStorageVBoxzip (709 MB)

- Oracle VM storage connect plug-in for Oracle ZFS Storage Appliance (v101) o httpwwworaclecomtechnetworkserver-storagesun-unified-

storagedownloadszfssa-plugins-1489830html

o This plug-in enables ZFS SA storage to be provisioned directly from the Oracle

VM Manager administration console

o 1 File (900 KB)

ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip

- Oracle VM template for Oracle Linux 5 update 7 (Paravirtualized) o httpsedeliveryoraclecomoraclevm

o File OVM_OL5U7_X86_64_PVM_10GBtgz (815 GB) o Gunzip the file to save time during the Lab (new size 244 GB)

- Oracle Java JRE 7u4 for Linux RPM X64 (64 bits version) o httpjavacomendownloadmanualjsp o File jre-7u4-linux-x64rpm (20 MB)

42 INSTALL PRIMARY OS AND VIRTUALBOX

5

- Install a 64 bit OS on your laptopdesktop system supported by Oracle VirtualBox o In our case Oracle Linux 6u3 64bits (unbreakable kernel installed by default) o 64 bits is mandatory to manage more than 4 GB of RAM

- Install VirtualBox and the extension pack o In our case version 4118 o To install the extension pack run VirtualBox then go to File Preferences

Extensions and click on the icon

- Configure a VirtualBox Host Only network (in VirtualBox go to File Preferences Network) o Network address 192168560 o Laptop IP 192168561 o Netmask 2552552550 o Disable the DHCP server since we will not use it o Open a terminal on your physical machine

- Installation Oracle Java JRE 7 on your physical machine o $ su -

rpm ndashivh jre-7u4-linux-x64rpm

o Restart your web browser

6

5 SUMMARY OF STEPS

In this labwe will execute the following steps 1) Install Oracle VM Server 311 in a VirtualBox VM from a VirtualBox template (ova file) 2) Install Oracle VM Manager 311 in a VirtualBox VM from a VirtualBox template 3) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 4) Install the ZFS SA storage connect plugin in Oracle VM 5) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Discover the ZFS SA d Create 2 ZFS SA luns from OVM admin console e Create a clustered server pool using 1

st ZFS SA LUN

f Create a storage repository using the 2nd

ZFS SA LUN g Import an Oracle VM template in the repository h Create a Oracle VM virtual machine based on the imported template

6 GLOBAL PICTURE The following picture shows all the components (VirtualBox VMs and OVM VMs) with their names and configuration (memory IP address hellip)

At the beginning of this lab only the physical laptop is installed with Oracle Linux 6 update 3 + VirtualBox + Java JRE (blue rectangle) You will create the VirtualBox and OVM virtual machines during the lab using the steps described in this document At the end of this lab you will have a complete running testing platform for Oracle VM using ZFS SA iSCSI shared storage

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 4: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

4

3 IMPORTANT NOTES

Acronyms In the present document we will use the following acronyms

o OVM for ldquoOracle VM for X86rdquo o VM for ldquovirtual machinerdquo

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 (MUST BE DONE BEFORE LAB)

41 DOWNLOAD REQUIRED PRODUCTS

- Oracle VM VirtualBox latest version (4118 at this time) (about 90 MB) o httpswwwvirtualboxorgwikiDownloads o Download both the version for your OS and the extension pack (very small

common to all platforms) - Virtualbox template for Oracle VM Server 311 buil 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 buil 365 (315 GB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html

- Virtualbox template for Oracle Storage Appliance Simulator (vbox-2011100118) o httpwwworaclecomwebappsdialoguensdlgwelcomejspp_ext=Yampp_dlg_id=

10521841ampsrc=7299332ampAct=45

o File SunStorageVBoxzip (709 MB)

- Oracle VM storage connect plug-in for Oracle ZFS Storage Appliance (v101) o httpwwworaclecomtechnetworkserver-storagesun-unified-

storagedownloadszfssa-plugins-1489830html

o This plug-in enables ZFS SA storage to be provisioned directly from the Oracle

VM Manager administration console

o 1 File (900 KB)

ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip

- Oracle VM template for Oracle Linux 5 update 7 (Paravirtualized) o httpsedeliveryoraclecomoraclevm

o File OVM_OL5U7_X86_64_PVM_10GBtgz (815 GB) o Gunzip the file to save time during the Lab (new size 244 GB)

- Oracle Java JRE 7u4 for Linux RPM X64 (64 bits version) o httpjavacomendownloadmanualjsp o File jre-7u4-linux-x64rpm (20 MB)

42 INSTALL PRIMARY OS AND VIRTUALBOX

5

- Install a 64 bit OS on your laptopdesktop system supported by Oracle VirtualBox o In our case Oracle Linux 6u3 64bits (unbreakable kernel installed by default) o 64 bits is mandatory to manage more than 4 GB of RAM

- Install VirtualBox and the extension pack o In our case version 4118 o To install the extension pack run VirtualBox then go to File Preferences

Extensions and click on the icon

- Configure a VirtualBox Host Only network (in VirtualBox go to File Preferences Network) o Network address 192168560 o Laptop IP 192168561 o Netmask 2552552550 o Disable the DHCP server since we will not use it o Open a terminal on your physical machine

- Installation Oracle Java JRE 7 on your physical machine o $ su -

rpm ndashivh jre-7u4-linux-x64rpm

o Restart your web browser

6

5 SUMMARY OF STEPS

In this labwe will execute the following steps 1) Install Oracle VM Server 311 in a VirtualBox VM from a VirtualBox template (ova file) 2) Install Oracle VM Manager 311 in a VirtualBox VM from a VirtualBox template 3) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 4) Install the ZFS SA storage connect plugin in Oracle VM 5) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Discover the ZFS SA d Create 2 ZFS SA luns from OVM admin console e Create a clustered server pool using 1

st ZFS SA LUN

f Create a storage repository using the 2nd

ZFS SA LUN g Import an Oracle VM template in the repository h Create a Oracle VM virtual machine based on the imported template

6 GLOBAL PICTURE The following picture shows all the components (VirtualBox VMs and OVM VMs) with their names and configuration (memory IP address hellip)

At the beginning of this lab only the physical laptop is installed with Oracle Linux 6 update 3 + VirtualBox + Java JRE (blue rectangle) You will create the VirtualBox and OVM virtual machines during the lab using the steps described in this document At the end of this lab you will have a complete running testing platform for Oracle VM using ZFS SA iSCSI shared storage

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 5: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

5

- Install a 64 bit OS on your laptopdesktop system supported by Oracle VirtualBox o In our case Oracle Linux 6u3 64bits (unbreakable kernel installed by default) o 64 bits is mandatory to manage more than 4 GB of RAM

- Install VirtualBox and the extension pack o In our case version 4118 o To install the extension pack run VirtualBox then go to File Preferences

Extensions and click on the icon

- Configure a VirtualBox Host Only network (in VirtualBox go to File Preferences Network) o Network address 192168560 o Laptop IP 192168561 o Netmask 2552552550 o Disable the DHCP server since we will not use it o Open a terminal on your physical machine

- Installation Oracle Java JRE 7 on your physical machine o $ su -

rpm ndashivh jre-7u4-linux-x64rpm

o Restart your web browser

6

5 SUMMARY OF STEPS

In this labwe will execute the following steps 1) Install Oracle VM Server 311 in a VirtualBox VM from a VirtualBox template (ova file) 2) Install Oracle VM Manager 311 in a VirtualBox VM from a VirtualBox template 3) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 4) Install the ZFS SA storage connect plugin in Oracle VM 5) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Discover the ZFS SA d Create 2 ZFS SA luns from OVM admin console e Create a clustered server pool using 1

st ZFS SA LUN

f Create a storage repository using the 2nd

ZFS SA LUN g Import an Oracle VM template in the repository h Create a Oracle VM virtual machine based on the imported template

6 GLOBAL PICTURE The following picture shows all the components (VirtualBox VMs and OVM VMs) with their names and configuration (memory IP address hellip)

At the beginning of this lab only the physical laptop is installed with Oracle Linux 6 update 3 + VirtualBox + Java JRE (blue rectangle) You will create the VirtualBox and OVM virtual machines during the lab using the steps described in this document At the end of this lab you will have a complete running testing platform for Oracle VM using ZFS SA iSCSI shared storage

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 6: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

6

5 SUMMARY OF STEPS

In this labwe will execute the following steps 1) Install Oracle VM Server 311 in a VirtualBox VM from a VirtualBox template (ova file) 2) Install Oracle VM Manager 311 in a VirtualBox VM from a VirtualBox template 3) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 4) Install the ZFS SA storage connect plugin in Oracle VM 5) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Discover the ZFS SA d Create 2 ZFS SA luns from OVM admin console e Create a clustered server pool using 1

st ZFS SA LUN

f Create a storage repository using the 2nd

ZFS SA LUN g Import an Oracle VM template in the repository h Create a Oracle VM virtual machine based on the imported template

6 GLOBAL PICTURE The following picture shows all the components (VirtualBox VMs and OVM VMs) with their names and configuration (memory IP address hellip)

At the beginning of this lab only the physical laptop is installed with Oracle Linux 6 update 3 + VirtualBox + Java JRE (blue rectangle) You will create the VirtualBox and OVM virtual machines during the lab using the steps described in this document At the end of this lab you will have a complete running testing platform for Oracle VM using ZFS SA iSCSI shared storage

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 7: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

7

7 STEP 1 INSTALL OVM SERVER amp OVM MANAGER

71 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM SERVER

During this step the user is going to create a first Virtualbox VM using the Virtualbox template OracleVMServer311build365ova available on Oracle public web site This VM will be our OVM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom For purposes of this lab and due to the time constraint we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file

OracleVMServer311build365ova

b) In ldquoAppliance settingsrdquo o Go to name and double-click on OracleVMServer311 Change name to

ldquoHOL9870_ovm-srvrdquo o Change CPU to 2 o Change RAM to 2048MB o Click on Import and Click on Agree to Accept License Agreement

c) Wait for the import to complete (about 2 minutes)

d) Go to Settings and Modify Network according to the following instructions o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Expand the Advanced section o Select ldquoAllow Allrdquo for Promiscuous mode

Make sure to enable the promiscuous mode on the network interfaces If not your Oracle VM virtual machine will not be accessible from your host machine (laptop here)

o Repeat all actions for Adapter 2

O Click OK to exit Settings

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 8: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

8

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-srvrdquo and Click Start

b) Look at the VM console and wait for message ldquoEnter Static IP addressrdquo

c) Enter the following information o For the static IP address enter ldquo192168562rdquo o For the netmask enter ldquo2552552550rdquo (default) o For the gateway enter ldquo192168561rdquo o For the DNS enter ldquo192168561rdquo o For the hostname enter ldquoovm-srvoowcomrdquo Notes DNS and gateway

o We donrsquot have DNS server and DNS domain in place (and donrsquot need to) but when using VirtualBox template for Oracle VM Server we need to enter an IP address for server (you can enter any IP address since it will be ignored)

o We donrsquot need an network gateway since we only used the VirtualBox internal network Yet VirtualBox template for Oracle VM Server will ask for an gateway IP address (you can enter any IP address since it will be ignored)

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 9: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

9

d) Your OVM Server is now ready and you should see the following on the console

Note the root password for this VM is ldquoovsrootrdquo

e) To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) In Application-gtSystem Tools-gtTerminal open a new terminal and ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 10: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

10

73 CREATE A VIRTUALBOX VM BY IMPORTING THE VIRTUALBOX TEMPLATE FOR ORACLE VM MANAGER

During this step the user is going to create a second Virtualbox VM For the creation of this VM will we use the pre-existing Virtualbox template OracleVMManager311build365ova This VM will be our OVM Manager The normal way of installing Oracle VM Manager is to install a Linux Server (Oracle Linux or Redhat Linux) and then to install Oracle VM Manager from a ISO cdrom Here we use the VirtualBox template to save time

a) In VirtualBox go to gtFilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9870_ovm-mgrrdquo Click on ldquoImportrdquo and click on Agree to accept License Agreement Note no need to change the RAM (4096 MB) and CPU (1 vcpu)

c) Wait for the import to complete (about 3 minutes)

d) Select the VM ldquoHOL9870_ovm-mgrrdquo and Click on ldquoSettingsrdquo o Go to Network and select ldquoHost-Only Adapterrdquo in Attached for Adapter 1

Note no need to set promiscuous mode to ldquoAllow allrdquo for the network interface as no VM will run on the manager

74 START AND CONFIGURE THE ORACLE VM MANAGER VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_ovm-mgrrdquo and Click Start

b) Look at the VM console and wait for message ldquoNew Unix Passwdrdquo

c) Enter the following o For ldquoNew Unix passwdrdquo enter ldquoovsrootrdquo twice (same as Oracle VM Server password)

Ignore warning ldquoBAD PASSWORDrdquo this is because password is not secure o For static IP address enter ldquo192168563rdquo o For netmask enter ldquo2552552550rdquo (default) o For gateway enter ldquo192168561rdquo o For DNS server enter ldquo192168561rdquo o For hostname enter ldquoovm-mgroowcomrdquo

d) Wait for the VM to be ready (when Gnome Desktop displayed) (about 2 minutes) e) To gain access back to the mouse stroke right ldquoCRTLrdquo key on your keyboard and Minimize

the ldquoHOL9870_ovm-mgrrdquo window f) On your Oracle Linux desktop open a new terminal ( gtApplicationsgtSystems

ToolsgtTerminal) and ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK g) Minimize the OracleVM Manager Window

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 11: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

11

8 STEP 2 INSTALL ZFS STORAGE APPLIANCE In this LAB we will run main OVM operation on a ZFS Storage Appliance (iSCSI access) using the ldquoStorage Connect plug-inrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management Since we donrsquot have real ZFS Storage Appliance for the lab we will use the ZFS SA simulator which is a tool we can run in a VirtualBox VM

81 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file

~HOL_OOWLAB3_HOL9870SunStorageVBoxzip This will create a directory named vbox-2011100118

b) In VirtualBox go to gtFilegtImport Appliance and select the file Sun ZFS Storage 7000ovf stored in the directory vbox-2011100118

c) In ldquoAppliance settingsrdquo o Go to name and double-click on Sun_ZFS_Storage_7000 Change name to

ldquoHOL9870_zfssardquo o Go to Systems and Change CPU to 1 o Click on Import

d) Wait for the import to complete (about 2 minutes)

e) Modify Storage settings

o Select the VM HOL9870_zfssa and Click on ldquoSettingsrdquo

o Go to Storage select Sun ZFS Storage 7000-disk2vmdk and click on icon to remove this virtual disk

o Repeat those actions for disk3 to disk16

o Select SATA Controller and click on icon to add a new disk

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 12: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

12

o Create a new disk type VDI Dynamically allocated name data-disk2 size 20GB

By default the ZFS SA simulator has 15 disks (15 virtual disks of 5 GB each) To get better performance on our laptop we will avoid stripping data on several virtual disks that are all stored in a single low performance disk (25rdquo 5400 rpm disk in laptops) Thatrsquos why we deleted the 15 5 GB data disks and created 1 single 20 GB disk

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 13: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

13

o Once created select SATA Controller and make sure to enable Use host IO cache (for optimized performance on the laptop)

f) Modify Network settings o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in ldquoAttached toldquo

o Click OK to exit Settings

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 14: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

14

82 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9870_zfssardquo and Click Start

b) Look at the VM console

and wait for message ldquoPress any key to begin configuring appliance []rdquo

c) Enter the following information (use the TAB key to go to next field) o Host Name zfssa o DNS Domain oowcom o IP Address 192168565 o IP Netmask 2552552550 o Default Router 192168561 o DNS Server 192168561 o Password ovsroot o Press ESC and 1 when finished

d) Wait for the VM to finish its boot (OK when you can see ldquozfssa console loginrdquo)

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 15: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

15

o To gain access back to the mouse press the right ldquoCTRLrdquo key on your keyboard and minimize the ldquoHOL9870_zfssardquo window

e) As explained on the console the next steps of the initial configuration will be done in

the ZFS SA admin console in a web browser o Open a web browser (Firefox during OpenWorld lab) and open the URL

https192168565215

o Ignore security warnings because of https self signed certificates In Firefox click on ldquoI understand the Risksrdquo ldquothen Add Exceptionsrdquo and ldquoConfirm Security Exceptionsrdquo

o Ignore the message ldquoUnsupported Browserrdquo and click Continue

o Login with Username root and Password ovsroot

o Click on Start to start the initial configuration of the ZFS SA simulator

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 16: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

16

o In Step 1 of 6 (Configure networking) click on Commit since no modification needed

o In Step 2 of 6 (Configure DNS) click on Commit since no modification is needed

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 17: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

17

o In Step 3 of 6 (Configure Time) click on Commit since no modification is needed

o In Step 4 of 6 (Configure Name Services) click on Commit since no modification is needed

o In Step 5 of 6 (Configure Storage) click on icon to configure the storage

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 18: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

18

o Name of the pool will be zfspool

o Check Data Devices is set to 1 click on Commit

o Data Profile is striped (automatically chosen since there is only one data disks) click on Commit

o In step 5 of 6 (Configure storage) click on Commit

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 19: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

19

o In step Registration amp Support click on later (no need to register the product here)

o Ignore the warning about not registering

o You should now see a message ldquosuccessfully configuredrdquo

83 CREATE AN ISCSI TARGET AND ISCSI GROUP ON THE ZFS SA DEDICATED TO OVM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 20: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

20

Before using the ZFS SA in OVM Manager we need to create dedicated iSCSI target and iSCSI group

o At the top of the screen go to Configuration SAN then iSCSI Targets

o Click on icon to create a new iSCSI target

o Give a name (alias) to the new iSCSI target ovm-iscsi-target for instance Note you can choose any name you want but you will have to enter the exact same name later in OVM Manager Leave all parameters to default value

o Click OK to create the iSCSI target

o You should now see the iSCSI target named ovm-iscsi-target

o Drag and drop the iSCSI Target just created in the iSCSI Target Groups panel (on the right) to create a iSCSI group named targets-0 according following instructions

Move the mouse pointer in front of the icon Press left mouse button

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 21: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

21

While keeping the left mouse button pressed move the mouse pointer to the right (below iSCSI Target Group named default)

Release the left mouse button

o Select the group targets-0 and click on the icon to edit it (to rename it) o Change the name to ovm-iscsi for instance and click OK

o You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group

ovm-iscsi

o Finally click on Apply to actually create the iSCSI target and the iSCSI target group

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 22: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

22

84 INSTALL THE STORAGE CONNECT PLUG-IN FOR ZFS SA The installation of the storage connect plug-in consist of several actions o Installation of a RPM on the OVM server o On the ZFS SA installation of Workflows

(already done in the ZFS SA simulator we use) o On the ZFS SA create a dedicated user if the ZFS SA is shared with other applications

(not needed in the lab see plug-in documentation if interested) o On the ZFS SA create an iSCSI target and an iSCSI group to be used by OVM (done

previously)

a) On your physical machine Go in Applications-gtSystem open an new Terminal Windows unzip the file ~HOL_OOWLAB3_HOL9879ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

c) Unzip the file OVMPluginzip

This will create 2 files

o OVMPluginAdminGuidepdf (documentation) o osc-oracle-s7k-012-45el5noarchrpm (RPM to install on the OVM Server)

d) Install the RPM file on the OVM server

From the physical machine open a new terminal $ scp osc-oracle-s7k-012-45el5noarchrpm root192168562tmp $ ssh root192168562

[rootovm-srv ~] rpm ndashivh tmposc-oracle-s7k-012-45el5noarchrpm

e) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build 365 o Modifiy the file initiatornameiscsi

rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line Ask your instructor if you are not familiar with vi

o The file should now look like InitiatorName=iqn1988-12comoracle66624642f860

o Restart the iscsid service and exit the terminal session [rootovm-srv ] service iscsid restart

[rootovm-srv ] exit

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 23: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

23

9 STEP 3 OVM OPERATIONS

91 DISCOVER THE OVM SERVER IN OVM MANAGER

a) Connect to Oracle VM Manager web console

o On your web browser previously launched on your physical machine native OS open a new tab and connect to Oracle VM Manager console (using URL http1921685637001ovmconsole)

o Log in using user ldquoadminrdquo and password ldquoWelcome1rdquo

o You should now see the Oracle VM Manager Console

b) Discover the Oracle VM Server

o Click on the icon o Leave 8899 for the Oracle VM Agent Port o Enter ldquoovsrootrdquo for the Oracle VM Agent Password o Enter ldquo192168562rdquo for the IP Address o Click OK to launch the discovery o Wait a few seconds o You should now see the server named ovm-srvoowcom in ldquoUnassigned Serversrdquo

Click on the server to see server information (cpu Memoryhellip)

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 24: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

24

92 CONFIGURE OVM NETWORKS

a) Modify Networks Oracle VM has a number of network channels Server Management Live Migrate Cluster Heartbeat Virtual Machine and Storage Server Management Live Migrate and Cluster Heartbeat roles are automatically assigned to the management network when you discover Oracle VM Server For simplicity we will use a single network for all roles by assigning Virtual Machine and Storage roles to the default network o Click on the Networking Tab

o Select Network 192168560 and click on the icon to edit properties o In the network channels list check the boxes ldquoVirtual Machinerdquo and ldquoStoragerdquo

o Leave all other parameters to the default values by Clicking Next gt Next gt Next gt Finish

b) Create VNICs (Virtual Network Interface Cards)

The VNIC Manager creates Virtual Network Interface Cards (VNICs) which can be used by virtual machines as network cards You create virtual network interfaces by defining a range of MAC addresses to use for each VNIC o In the Networking tab click on ldquoVirtual NICsrdquo o Click on ldquoAuto-Fillrdquo and then ldquoCreaterdquo This will create 20 VNICs using Mac Addresses 0021f6000000 to 0021f6000013 You should now see those VNICs listed

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 25: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

25

93 DISCOVER THE ZFS SA IN OVM MANAGER USING THE STORAGE CONNECT PLUG-IN

a) On your OVM Manager console (in your web browser) go to the ldquoStoragerdquo tab

b) Right click on ldquoSAN serversrdquo then click on ldquoDiscover SAN serverrdquo

c) Enter the following information in the Discover SAN Server window Name zfssa Storage Type iSCSI Storage Server Storage Plug-in Sun ZFS Storage Appliance SCSI Plug-in Private Data OVM-iSCSIOVM-iSCSI-Target Admin host 192168565 Admin username root Admin Password ovsroot Access Host (IP) Address 192168565 Access Port ltLeave blankgt Note be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously in ldquoPlug-in Private Datardquo

d) Click on Next

e) Click on to add our server as an admin server for this storage

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 26: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

26

f) Finally click on Finish You should now see the ZFS SA storage server

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 27: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

27

94 CREATE 2 LUNS ON THE ZFS SA FROM THE OVM MANAGER

a) In OVM Manager console

o Go to the Storage tab select the new array zfssa (in San servers)

o On the right window click on to create a new physical Disk (new LUN) (Check that the selected ldquoPerspectiverdquo is ldquoPhysical Disksrdquo)

o Name is LUN0 10GB for the size o Click OK to create the LUN

b) Create another physical disk named LUN1 size is 10GB

c) You should now see 2 LUNs

d) From your browser On the ZFS SA admin console go to Shares LUNs and check that both LUNs were actually created

e) Enable write cache on the ZFS SA to get better performance

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 28: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

28

Enabling the write cache allows better performance on the ZFS SA for write IOs but will result in data losscorruption in case of abnormal shutdown on the laptop (which is OK since we are only building a demo environment here)

This is needed on ZFS SA simulator when virtual disks are written on 1 single slow physical disk (5400 rpm disk here on laptop)

On a real physical ZFS SA write cache is enabled by default as the array has a physical memory cache

o On the ZFS SA admin console edit LUN0 parameter by clicking on the pencil icon

o Go to Protocols and enable the Write Cache (in Write Cache Behavior)

o Click on Apply o Repeat those operations for LUN1

f) In OVM Manager present both LUNs to the default Access group according following instructions o Go back to OVM Manager in Storage tab o Select the zfssa SAN Server o Select Access Groups in Perspective box list o Select default and Right click o Select Present-Unpresent

g) Click on to Add LUN0 and LUN1 to Selected Physical Disks and click OK

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 29: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

29

h) In Servers and VMs Tab right click on server ovm-srvoowcom and select Rescan Physical disks (click OK to confirm rescan)

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 30: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

30

95 CREATE A CLUSTERED SERVER POOL An OVM server pool contains a group of Oracle VM Servers which as a group perform virtual machine management tasks such as High Availability (HA) implementation of resource and power management policies access to networking storage and repositories The virtual machines running on a server can be ldquolive migratedrdquo to another server in the same pool Of course you need to have a shared storage system (NFS iSCSI FC) between all the servers of the pool The pool is called clustered in this case A clustered server pool needs a dedicated storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 10 GB This server pool file system is used to hold the server pool and cluster data and is also used for cluster heartbeat A non clustered pool can have only 1 server In a clustered pool with at least 2 servers one of them is the called master server and is in charge of several admin tasks In case of failure on this server another will take the master server pool role and get this IP address Here for the purpose of this LAB our clustered server pool will have only one server THIS IS NOT A RECOMMENDED CONFIGURATION A pool should have at least 2 servers

a) Create a clustered server pool using the Oracle VM server

Here we will create a clustered server pool with a single server and we will use LUN0 of the ZFS SA as the shared Lun o In Oracle VM Manager go to tab ldquoServers and VMsrdquo

o Click on the 3rd

icon from the left ( ) to create a new server pool

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 31: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

31

o Enter the following answers - Name clusterpool - Virtual IP Address for the pool 192168564 - check ldquoClustered Server Poolrdquo

- Select Physical Disk for the storage server pool click on icon and select LUN0

- click on ldquoNextrdquo

o On the next window click on icon to add all servers (here only 1) to the pool and finally click on Finish

o Once created you should now see the server pool and our OVM server ovm-srv in it

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 32: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

32

96 CREATE A STORAGE REPOSITORY ON THE ZFS SA LUN Before creating we need to create at least one Storage Repository to store the VMs files but also ISO files templateshellip

o Click on the ldquoRepositoriesrdquo tab

o Click on to create a new Storage repository

o Enter the following information

o Repository Name myrepo

o Repository Location Physical Disk

o Server Pool is clusterpool

o Click on the icon and select LUN1

Note only unused and unpartitioned Luns can be used

o Click Next

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 33: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

33

Note The creation of the repository is going to take about 4 minutes because of IO

contention on the disk of the laptop During this time you can go on the ZFSSA admin

console and see activity (cpu Disk iSCSIhellip) in ldquoStatusrdquo

o Go back to OVM Manager and Click on to present this repository to all servers (here only 1) and finally click on Finish

o Wait a few seconds for the repository to be created

Note for non-NFS storage (which is our case here) an OCFS2 filesystem is created on the repository

o You should now see the new repository (click on to expand)

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 34: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

34

97 NOTES ON PVMHVM VMS AND TEMPLATES Notes on paravirtualized hardware virtualized VMs

o A virtual machine can have 3 types Hardware virtualized (HVM) An unmodified guest operating system

executes in complete isolation Instructions are trapped and emulated at the hardware level (Intel VT-xVT-i and AMD-V) allowing excellent performance thanks to limited overhead for guest modifications

Paravirtualized (PVM) A software interface similar but not identical to the underlying hardware is presented to the guest operating system Paravirtualization provides hooks for guest instructions so that complicated tasks can be performed by the host instead of the virtual machine where performance is worse Paravirtualization requires that the guest kernel is ported to be made aware of the virtual environment

Hardware virtualized with paravirtualized drivers (PVHVM) Similar to

HVM but with additional paravirtualized drivers to off load more processes to the host and increase VM performance This domain type is typically used to run Microsoft Windows guests with a limited performance penalty

o When installing Oracle VM servers in Virtualbox only Paravirtualized VMs can be created in Oracle VM servers

Notes on templates

o An oracle VM template is a ldquoVM imagerdquo pre-built that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template

o A template contains an OS image and generally contains databases and applications already installed and configured

o You can download many oracle VM templates built by Oracle on httpsedeliveryoraclecomoraclevm

o Those Oracle provided template have an Oracle OS (Oracle Linux or Oracle Solaris) o You can also create your own templates using the OS and applications you want o Here because of time constraint we will use a very simple template containing only

Oracle Linux 5 update 7 OS

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 35: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

35

98 SETUP AN HTTP WEB SERVER FOR ISO TEMPLATEShellip Importing objects ( Templates ISO images hellip) into Oracle VM can be done in several ways

o http web server using syntax httphost[port]pathfile o Anonymous ftp server using syntax ftphost[port]pathfile o Authenticated ftp server using syntax ftpuserpasswordhost[port]pathfile

In this lab we will use an HTTP web server (apache2) already running on the Oracle VM Manager

a) Create a directory to store the files that will be imported later o On your physical machine native OS open a new terminal o $ ssh root192168563 (password is ovsroot) o mkdir varwwwhtmlfiles

o chmod 777 varwwwhtmlfiles

o exit

Reminder if using Windows OS on your physical machine you will need tools to replace ssh and scp (putty and WinSCP for instance)

b) Transfert the file which will be needed later in the lab from your terminal o $ cd ~OOW_HOLLAB3_HOL9870 o $ scp OVM_OL5U7_X86_64_PVM_10GBtgz root192168563varwwwhtmlfiles

c) On your physical machine native OS start a web browser (Firefox during the OpenWorld lab)

and open the URL http192168563files to check the web server is working fine

d) Leave Firefox open you will need it later

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 36: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

36

99 IMPORT ORACLE LINUX 5U7 PVM TEMPLATE

a) Go to the ldquoRepositoriesrdquo tab

b) Expand ldquoRepositoriesrdquo and ldquomyrepordquo

c) Click on ldquoVM Templatesrdquo

d) Click on icon

e) Enter the URL of the file to be imported http192168563filesOVM_OL5U7_X86_64_PVM_10GBtgz

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 37: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

37

f) Click on OK to start the import

g) The import should take about 5 minutes o Import consists of 2 steps download and unpacking o You can follow progress in the ldquoJob summary panelrdquo o Once the import is finished you should see the template in rdquoVM Templatesrdquo

h) Select and Edit the template o Memory replace 2048MB by 1024MB o CPU replace 2 par 1

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 38: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

38

o In ldquoNetworksrdquo Tab add network ldquo192168560rdquo in ldquoSelect Ethernet Networksrdquo and click OK

910 CREATE AN OVM VM FROM THE OVM TEMPLATE

a) Before going on check that the template import is finished and make sure that all template modifications (CPU memory network) are done

b) In Oracle VM Manager web console go to ldquoServers and VMsrdquo Tab

c) Expand the server pool and right click on the server ovm-srvoowcom

d) Click on ldquoCreate Virtual Machinerdquo

e) Select ldquoClone from an existing VM Templaterdquo and enter the following information o Select ldquomyrepordquo as the repository o Select OVM_OL5U7_X86_64_PVM_10GBtgz as the VM Template o Enter ldquoguest-vmrdquo for the VM Name o Select ldquoclusterpoolrdquo as the Server pool

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 39: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

39

f) Click ldquoFinishrdquo to start VM creation Note Immediate VM creation on OCFS2 The VM creation should be almost immediate since the repository use OCFS2 filesystem and the reflink feature This avoids to copy 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 httpsblogsoraclecomwimentryocfs2_reflink)

g) You should now see the OVM VM in the status stopped

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 40: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

40

911 START THE OVM VM GUEST-VM

o Select the VM guest-vm

o Start the VM by clicking on

o Click on to launch VM console

o If needed allow popup in your web browser (Firefox during OpenWorld lab)

o Tell Firefox to use usrjavajre170_04binjavaws (installed with Java JRE) to

open jnlp files (Only needed the 1st time you open a vm console)

o Follow VM boot in the console

And enter information when asked - New unix root password ovsroot (ignore warning BAD PASSWORD) - Enable DHCP n - IP address 1921685611 - IP netmask 2552552550 - IP gateway 192168561 - IP address for DNS serveur 192168561 - Hostnamedomainname guest-vmoowcom

o Now you can log on this VM from a terminal in your Linux desktop

$ ssh root1921685611

o When ready shutdown the VM (to save laptop resources)

[rootguest-vm ] halt

This concludes this hands on lab

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012

Page 41: Oracle VM Lab 3 x86 Enterprise Cloud Infrastructure with Oracle VM

41

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS httpwwworaclecomtechnetworkserver-storagevmoverviewindexhtml Lots of very good white papers Just to mention a few ones

Oracle VM 3 Quick Start Guide (PDF)

Oracle VM 3 Architecture and Technical Overview (PDF)

Oracle VM 3 Storage Connect Overview (PDF)

Oracle VM 3 Building a Demo Environment using Oracle VM VirtualBox (PDF)

103 THIS DOCUMENT This document can be found on httpblogsoraclecomcpauliatHOL_OOW2012