38
1 Oracle VM Lab 1 Deploying an IaaS Environment with Oracle VM This hands-on lab takes you through the planning and deployment of an infrastructure as a service (IaaS) environment 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. This lab represents part 1 of a global lab. Lab 2 is building on the foundation of Lab 1 and will immediately follow this lab. We highly recommend people to attend both Lab 1 and Lab 2 to gain the full experience and power of Oracle VM. Lab Authors: Olivier Canonge Systems sales consultant, Oracle France [email protected] Christophe Pauliat Systems sales consultant, Oracle France [email protected] Simon Coter Technical expert in core technology, Oracle Italy. [email protected] Eric Bezille Chief Technologist, Oracle France. [email protected]

Oracle VM Lab 1 Deploying an IaaS Environment with Oracle VM

  • Upload
    others

  • View
    39

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Oracle VM Lab 1 Deploying an IaaS Environment with Oracle VM

1

Oracle VM ndash Lab 1 Deploying an IaaS Environment with Oracle VM This hands-on lab takes you through the planning and deployment of an infrastructure as a service (IaaS) environment 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 This lab represents part 1 of a global lab Lab 2 is building on the foundation of Lab 1 and will immediately follow this lab We highly recommend people to attend both Lab 1 and Lab 2 to gain the full experience and power of Oracle VM

Lab 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 (MUST be done before LAB) 4

41 Download required products 4

42 Install Primary OS and VirtualBox 5

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 9

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

74 Start and configure the Oracle VM Manager vm 11

8 Step 2 ovm operations with basic storage 12

81 Configure Oracle VM Manager (create server pool and storage repository) 12

82 Notes on HVMPVM VMs and Templates 17

83 Setup an http web server for ISO Templateshellip 18

84 Import Oracle Linux 5u7 PVM template 19

85 Create an ovm VM from the ovm template 21

86 Start the Ovm VM guest-vm 22

9 Step 3 advanced storage with OVM Storage connect plug-in for ZFS SA 23

91 Create a virtualbox vm for the ZFS SA simulator 23

92 Start and configure the ZFS SA simulator VirtualBox VM 24

93 Install the storage connect plug-in for the ZFS SA 31

94 Discover the ZFS SA simulator in ovm manager using the storage connect plug-in 34

95 Provision ZFS SA storage Luns from OVM Manager 36

10 References 38

101 Oracle VM documentation 38

102 Oracle VM for X86 white papers 38

103 This document 38

Last update December 17

th 2012

Authors Christophe Pauliat Olivier Canonge Special thanks to Kris Bakke Doan Nguyen Honglin Su Simon Coter Eric Bezille Michel Kintz and Greg King

3

1 LAB OBJECTIVE This hands-on lab takes you through the planning and deployment of an infrastructure as a service (IaaS) environment 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 Lab 1 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 that will later be used by Oracle VM for X86 and the ZFS storage appliance simulator so that we can install all software components on a single physical machine Since Oracle VM VirtualBox is available on many X86 Operating Systems the native operating system on the laptopdesktopserver machine may be any of these Yet 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 Oracle VM 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 the time of writing) (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 build 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 build 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)

5

42 INSTALL PRIMARY OS AND VIRTUALBOX

- 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) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Create a server pool d Create a storage repository e Import an Oracle VM template in the repository f Create a Oracle VM virtual machine based on the imported template

4) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 5) Install the ZFS SA storage connect plugin in Oracle VM 6) Create a ZFS SA LUN from Oracle VM Manager

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

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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

2

CONTENTS

1 Lab objective 3

2 Minimal configuration to run this lab 3

3 Important notes 4

4 Preparation (MUST be done before LAB) 4

41 Download required products 4

42 Install Primary OS and VirtualBox 5

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 9

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

74 Start and configure the Oracle VM Manager vm 11

8 Step 2 ovm operations with basic storage 12

81 Configure Oracle VM Manager (create server pool and storage repository) 12

82 Notes on HVMPVM VMs and Templates 17

83 Setup an http web server for ISO Templateshellip 18

84 Import Oracle Linux 5u7 PVM template 19

85 Create an ovm VM from the ovm template 21

86 Start the Ovm VM guest-vm 22

9 Step 3 advanced storage with OVM Storage connect plug-in for ZFS SA 23

91 Create a virtualbox vm for the ZFS SA simulator 23

92 Start and configure the ZFS SA simulator VirtualBox VM 24

93 Install the storage connect plug-in for the ZFS SA 31

94 Discover the ZFS SA simulator in ovm manager using the storage connect plug-in 34

95 Provision ZFS SA storage Luns from OVM Manager 36

10 References 38

101 Oracle VM documentation 38

102 Oracle VM for X86 white papers 38

103 This document 38

Last update December 17

th 2012

Authors Christophe Pauliat Olivier Canonge Special thanks to Kris Bakke Doan Nguyen Honglin Su Simon Coter Eric Bezille Michel Kintz and Greg King

3

1 LAB OBJECTIVE This hands-on lab takes you through the planning and deployment of an infrastructure as a service (IaaS) environment 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 Lab 1 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 that will later be used by Oracle VM for X86 and the ZFS storage appliance simulator so that we can install all software components on a single physical machine Since Oracle VM VirtualBox is available on many X86 Operating Systems the native operating system on the laptopdesktopserver machine may be any of these Yet 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 Oracle VM 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 the time of writing) (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 build 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 build 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)

5

42 INSTALL PRIMARY OS AND VIRTUALBOX

- 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) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Create a server pool d Create a storage repository e Import an Oracle VM template in the repository f Create a Oracle VM virtual machine based on the imported template

4) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 5) Install the ZFS SA storage connect plugin in Oracle VM 6) Create a ZFS SA LUN from Oracle VM Manager

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

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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

3

1 LAB OBJECTIVE This hands-on lab takes you through the planning and deployment of an infrastructure as a service (IaaS) environment 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 Lab 1 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 that will later be used by Oracle VM for X86 and the ZFS storage appliance simulator so that we can install all software components on a single physical machine Since Oracle VM VirtualBox is available on many X86 Operating Systems the native operating system on the laptopdesktopserver machine may be any of these Yet 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 Oracle VM 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 the time of writing) (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 build 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 build 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)

5

42 INSTALL PRIMARY OS AND VIRTUALBOX

- 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) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Create a server pool d Create a storage repository e Import an Oracle VM template in the repository f Create a Oracle VM virtual machine based on the imported template

4) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 5) Install the ZFS SA storage connect plugin in Oracle VM 6) Create a ZFS SA LUN from Oracle VM Manager

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

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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment 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 Oracle VM 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 the time of writing) (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 build 365 (209 MB)

o httpwwworaclecomtechnetworkserver-storagevmtemplate-1482544html - Virtualbox template for Oracle VM Manager 311 build 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)

5

42 INSTALL PRIMARY OS AND VIRTUALBOX

- 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) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Create a server pool d Create a storage repository e Import an Oracle VM template in the repository f Create a Oracle VM virtual machine based on the imported template

4) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 5) Install the ZFS SA storage connect plugin in Oracle VM 6) Create a ZFS SA LUN from Oracle VM Manager

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

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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

5

42 INSTALL PRIMARY OS AND VIRTUALBOX

- 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) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Create a server pool d Create a storage repository e Import an Oracle VM template in the repository f Create a Oracle VM virtual machine based on the imported template

4) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 5) Install the ZFS SA storage connect plugin in Oracle VM 6) Create a ZFS SA LUN from Oracle VM Manager

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

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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment 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) Configure and Oracle VM Manager

a Discover the Oracle VM server b Configure network and VNICs (Virtual Network Interface Cards) c Create a server pool d Create a storage repository e Import an Oracle VM template in the repository f Create a Oracle VM virtual machine based on the imported template

4) Install ZFS Storage Appliance simulator in a VirtualBox VM from a VirtualBox template 5) Install the ZFS SA storage connect plugin in Oracle VM 6) Create a ZFS SA LUN from Oracle VM Manager

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

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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment 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 For the creation of this VM will we use the pre-existing Virtualbox template OracleVMServer311build365ova This VM will be our Oracle VM Server NOTE The normal way of installing Oracle VM Server is to boot on an ISO filecdrom Here for purposes of simplifying a lab environment 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

ldquoHOL9558_ovm-srvrdquo o Change CPU to 3 (needed for next LAB Oracle VM Lab 2) o If you have 16 GB of RAM change RAM to 5120MB (needed for next LAB Oracle VM

Lab 2) o If you have 8 GB of RAM 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) Modify Storage settings

o Select the VM HOL9558_vm-srv and Click on ldquoSettingsrdquo

o Go to Storage remove the disk2 (select it under ldquoSata Controllerrdquo and click on )

o Add a new 100 GB hard drive (we will use this drive later as a repository) by selecting

Sata Controller and clicking on the icon (new disk -gt type VDI -gt dynamically

allocated -gt name laquo repo raquo -gt Size 100g)

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

8

e) Modify Network settings

o 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 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 o Repeat these actions for Adapter 2

o Click OK to exit Settings

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

9

72 START AND CONFIGURE THE ORACLE VM SERVER

a) In the VirtualBox admin console select the VM ldquoHOL9558_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)

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

10

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 CTRLrdquo key on your keyboard and minimize the ldquoovm-srvrdquo window

f) IMPORTANT On your physical machine native OS (Oracle Linux during the OpenWorld lab) open a new terminal (Applications -gt System Tools -gt Terminal) and run ping 192168562 (ovm-srv) to check that the Virtualbox VM is OK

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 we will 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 FilegtImport Appliance and select the file OracleVMManager311build365ova

b) In ldquoAppliance settingsrdquo go to name and double-click OracleVMManager311build365 and change name to ldquoHOL9558_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)

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

11

d) Select the VM ldquoovm-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 ldquoHOL9558_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 press the right CTRLrdquo key on your keyboard and

minimize the ldquoovm-mgrrdquo window

f) On your Oracle Linux desktop open a new terminal ApplicationsgtSystems ToolsgtTerminal and run ping 192168563 (ovm-mgr) to check that the Virtualbox VM is OK

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

12

8 STEP 2 OVM OPERATIONS WITH BASIC STORAGE

81 CONFIGURE ORACLE VM MANAGER (CREATE SERVER POOL AND STORAGE REPOSITORY)

a) Connect to Oracle VM Manager web console

o On your Linux physical desktop open a firefox browser 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

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

13

o Under Unassigned Servers Click on the server to see server information (cpu Memoryhellip)

c) 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

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

14

d) 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 You should now see those VNICs listed

e) Create a server pool using the Oracle VM server Note A 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 Here for simplicity we will create a non-clustered server pool with a single server and will use a local HDD (hard disk drive) (actually a file on the laptop seen by VirtualBox as a HDD) o In Oracle VM Manager go back to tab ldquoServers and VMsrdquo

o Click on the 3rd

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

o Enter the following answers - Name mypool - Virtual IP Address for the pool 192168564 - Uncheck ldquoClustered Server Poolrdquo Note The Virtual IP Address of the pool is assigned to one server in the pool called the master server Several actions are executed by this master server In a non clustered-pool with just 1 server the server is also the master server

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

15

In a clustered pool with at least 2 servers one of them is the master server In case of failure on this server another will take the master server pool and get this IP address - and click on ldquoNextrdquo

Note If you want to create a clustered server pool you need to have a dedicated Storage (NFS Filesystem or iSCSI Lun or FC Lun) with a size of at least 12 GB (not needed here)

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

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

icon to expand)

f) Create the storage repository Before creating VMs hosted on the server pool we need to create at least one Storage Repository to store the VMs files but also ISO templateshellip

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

16

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 (used for local HDD iSCSI and FC Luns)

o Select the right server pool (only one choice for mypool here)

o Click on the icon to select the local HDD (100 GB)

Note only unused and unpartitioned local HDDs can be used

o Click Next

o 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 (Oracle Cluster File System) filesystem is created on the repository

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

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

17

82 NOTES ON HVMPVM 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 (PVM) 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

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

18

83 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_LABLAB1_HOL9558 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) Keep Firefox open you will need it later

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

19

84 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

f) Click on OK to start the import g) The import should take about 3 minutes

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

20

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 by clicking on o Memory replace 2048MB by 1024MB o CPU replace 2 by 1

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

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

21

85 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 ldquomypoolrdquo as the Server pool

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

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

22

86 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

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

23

9 STEP 3 ADVANCED STORAGE WITH OVM STORAGE CONNECT PLUG-IN FOR ZFS SA

In the previous section we run the main OVM operations on a basic storage device (local HDD) Here we will use the ldquoStorage Connectrdquo feature of OVM This feature enables the storage to be provisioned directly from OVM admin console (OVM Manager) simplifying the global management To illustrate this feature we will use the ldquoStorage Connect plug-inrdquo for Oracle ZFS Storage Appliance Many OVM storage connect plug-ins are available for many storage systems provided by different vendors (see Oracle VM documentation to get the exact list) 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 We wonrsquot have time to repeat all operations on the ZFS SA in this lab Oracle VM Lab 1 If yoursquore interested please go to Oracle VM Lab 3

91 CREATE A VIRTUALBOX VM FOR THE ZFS SA SIMULATOR

a) On your physical machine unzip the file ~OOW_LABLAB_HOL9558SunStorageVBoxzip

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

ldquoHOL9558_zfssardquo o If you have 16 GB of RAM keep 2048MB for RAM o (If yoursquore running the lab on your own machine and have only 8 GB of RAM change RAM

to 1024MB) o Click on Import

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

e) Modify Network settings

o Select the VM zfssa and Click on ldquoSettingsrdquo o Go to Network then Adapter 1 tab o Select ldquoHost-Only Adapterrdquo in Attached o Repeat these actions for Adapter 2

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

24

o Click OK to exit Settings

92 START AND CONFIGURE THE ZFS SA SIMULATOR VIRTUALBOX VM

a) In the VirtualBox admin console select the VM ldquoHOL9558_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

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

25

o Press ESC and 1 when finished

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

o To gain access back to your mouse press the right ldquoCTRLrdquo key and minimize the lsquoovm-srvrdquo 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

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

26

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

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

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

27

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

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

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

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

28

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

o In the Data Devices scroll down menu choose 5 devices and click on Commit

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

29

o Select line ldquoStripedrdquo in Data Profile and click on Commit

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

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

30

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

o Leave the ZFS SA admin console open as you will need it again later

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

31

93 INSTALL THE STORAGE CONNECT PLUG-IN FOR THE ZFS SA

Installation of the 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

a) On your physical machine unzip the file ZFSSA_storage_connect_plugin_101_for_OVM_p13559479_120_Genericzip This will create 3 files

o readmetxt o OVMPLuginzip o ZFSSAWorkflowszip

b) 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)

c) 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 tmp osc-oracle-s7k-012-45el5noarchrpm

d) In OVM Manager (in your web Browser) rediscover the OVM Server to enable the plug-in On the ldquoServers and VMsrdquo tab right click on the server ovm-srvoowcom and click Rediscover Server

e) In the ZFS SA admin console create an iSCSI target named ovm-iscsi-target and an iSCSI group named ovm-iscsi

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

32

o Go back to the ZFS SA admin console (URL https192168565215 in your web browser)

o Click on Configuration SAN and iSCSI Targets

o Click on icon to create a new iSCSI target

o Leave all parameters to default value except Alias when you need to enter the following name ovm-iscsi-target 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 to create a iSCSI group named targets-0

Move the mouse pointer in front of the icon Press left mouse button 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

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

33

o Select the group targets-0 and click on the icon to edit it (to rename it)

o Select the group targets-0 and click on the icon to edit it (to rename it) Change the name to ovm-iscsi 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

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

34

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

ONLIN a) Fix a bug on the OVM Server (only present in OVM Server created from the OVA file build

365 o On your physical laptop open a new terminal and connect (SSH) on the OVM server o $ ssh root192168562

o [rootovm-srv ] vi etciscsiinitiatornameiscsi

Add laquo InitiatorName= raquo in the front of the first line o The file should now look like

InitiatorName=iqn1988-12comoracle66624642f860 o [rootovm-srv ] service iscsid restart

o [rootovm-srv ] exit

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

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

d) 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

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

35

e) Click on Next

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

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

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

36

95 PROVISION ZFS SA STORAGE LUNS FROM OVM MANAGER

One the storage connect plug-in is installed you can provision storage (create LUNs) directly from the OVM Manager console

a) In Storage tab under SAN servers select the new array zfssa On the right window click on

to create a new Physical Disk LUN name is LUN0 size is 10Gb

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

c) You should now see 2 LUNs

d) On the ZFSSA admin console Go in Shares and you can check boths LUNs are there

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

37

This concludes this hands on lab If you want to go further

In Oracle VM Lab 2 we will create OVM virtual machines from a more complex OVM template containing Oracle Database 11gr2 with RAC (Real Applications Cluster)

In Oracle VM Lab 3 we will repeat all operations of this lab using only the ZFS SA

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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 1 Deploying an IaaS Environment with Oracle VM

38

10 REFERENCES

101 ORACLE VM DOCUMENTATION httpwwworaclecomtechnetworkserver-storagevmdocumentationindexhtml

102 ORACLE VM FOR X86 WHITE PAPERS

Oracle Optimized Solution for Enterprise Cloud Infrastructure mdash Implementation Guide (x86-Linux) httpwwworaclecomocomgroupspublicotndocumentswebcontent1508069pdf

Oracle Storage Connect Plug-in for Sun ZFS Storage Appliance Administration Guide httpwwworaclecomtechnetworkserver-storagesun-unified-storagedownloadszfssa-plugins-1489830html (download the plugin and extract all zip files to get the pdf file)

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