Deploying a Cloud Infrastructure with Oracle VM 3.x and the Sun ZFS Storage Appliance

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

by Christophe Pauliat and Olivier Canonge

This hands-on lab demonstrates how to plan and deploy a cloud infrastructure using Oracle VM as the foundation.


Published February 2013

Prerequisites
Summary of the Exercises
Notes on Paravirtualized VMs, Hardware Virtualized VMs, and Templates
Exercise 1: Install Oracle VM Server
Exercise 2: Install Oracle VM Manager
Exercise 3: Install the Sun ZFS Storage Appliance Simulator
Exercise 4: Install the Storage Connect Plug-in for the Sun ZFS Storage Appliance
Exercise 5: Configure Oracle VM Manager
See Also
About the Authors
Acknowledgments

If you'd like to download software, participate in forums, and get access to other technical how-to goodies in addition to content like this, become an OTN member. No spam!

This lab, which is Part 3 of a three-part series, is very similar to Part 1, "Deploying an IaaS Environment with Oracle VM." As in Part 1, you will create an Oracle VM Server for x86 demo environment on a single laptop, desktop, or server machine using Oracle VM VirtualBox.

The main difference between this lab and Part 1 is that in this lab, you will use Oracle's Sun ZFS Storage Appliance Simulator (an Oracle VM VirtualBox virtual machine that simulates a Sun ZFS Storage Appliance NAS filer) as a shared storage system to store all Oracle VM data, and you will use the Storage Connect feature of Oracle VM to manage the shared storage system from the Oracle VM administration console (Oracle VM Manager).

Upon completion of this lab, you will have a virtualized infrastructure with a virtual server, a shared storage system, and a management console.

Prerequisites

In this lab, we use Oracle VM VirtualBox to create three virtual machines: one for Oracle VM Server, one for Oracle VM Manager, and one for Oracle's Sun ZFS Storage Appliance Simulator. This allows us to install all software components on a single physical machine.

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

Note: All operations for this lab were tested only on Oracle Linux 6 update 3 (64 bit) with Unbreakable Enterprise Kernel.

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

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

  • Oracle VM VirtualBox
  • Oracle VM Server for x86

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

  • Oracle VM VirtualBox templates
  • Oracle VM Templates

Ensure You Have the Minimal Required Configuration

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

  • 8 GB of memory
  • Intel or AMD x86 quad-thread processor (quad-core or dual-core dual-thread)
  • 15 GB of disk space to store the files needed to start the lab
  • 15 GB of disk space to store the files that will be created during the lab

Download the Required Products

Install the Primary OS and Oracle VM VirtualBox

  1. Install on your laptop, desktop, or server system a 64-bit OS (mandatory for managing more than 4 GB of RAM) that is supported by Oracle VM VirtualBox.
  2. Install Oracle VM VirtualBox.
  3. Install the Oracle VM VirtualBox extension pack:

    1. Run Oracle VM VirtualBox.
    2. Then select File-> Preferences-> Extensions, and click icon.
  4. In Oracle VM VirtualBox, configure a host-only network:

    1. Select File-> Preferences-> Network.
    2. Specify the following:

      • Network address: 192.168.56.0
      • Physical machine's IP address: 192.168.56.1
      • Netmask: 255.255.255.0
    3. Disable the DHCP server since we will not use it.
    4. Open a terminal window on your physical machine.
  5. Install the JRE on your physical machine. For example, on a Linux machine, run the following command:

    $ su - 
    # rpm -ivh jre-7u4-linux-x64.rpm
    
  6. Restart your Web browser.

Summary of the Exercises

In this lab, you will execute the following steps:

  1. Exercise 1: Install Oracle VM Server 3.1.1 in an Oracle VM VirtualBox virtual machine from an Oracle VM VirtualBox template (.ova file).
  2. Exercise 2: Install Oracle VM Manager 3.1.1 in an Oracle VM VirtualBox virtual machine from an Oracle VM VirtualBox template.
  3. Exercise 3: Install the Sun ZFS Storage Appliance Simulator in an Oracle VM VirtualBox virtual machine from an Oracle VM VirtualBox template.
  4. Exercise 4: Install the Sun ZFS Storage Appliance Storage Connect plug-in in Oracle VM.
  5. Exercise 5: Configure Oracle VM Manager:

    1. Discover the Oracle VM Server.
    2. Configure the network and virtual network interface cards (VNICs).
    3. Discover the Sun ZFS Storage Appliance Simulator.
    4. Create two Sun ZFS Storage Appliance LUNs from the Oracle VM admin console.
    5. Create a clustered server pool using the first ZFS Storage Appliance LUN.
    6. Create a storage repository using the second ZFS Storage Appliance LUN.
    7. Set up an HTTP Web server.
    8. Import an Oracle VM Template into the repository.
    9. Create an Oracle VM (OVM) virtual machine based on the imported template.
    10. Start the VM.

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

Figure 1

Figure 1

At the beginning of this lab, only the physical machine is installed with Oracle Linux 6 update 3, Oracle VM VirtualBox, and the JRE (the blue rectangle in Figure 1). You will create the Oracle VM VirtualBox and Oracle VM virtual machines during the lab exercises. At the end of this lab, you will have a complete running testing platform for Oracle VM using Sun ZFS Storage Appliance iSCSI shared storage.

Notes on Paravirtualized VMs, Hardware Virtualized VMs, and Templates

There are three types of virtual machines:

  • Hardware virtualized VM (HVM). An unmodified guest operating system executes in complete isolation. Instructions are trapped and emulated at the hardware level (Intel VT-x/VT-i and AMD-V), allowing excellent performance thanks to limited overhead for guest modifications.
  • Paravirtualized VM (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 VM with paravirtualized drivers (PVHVM). Similar to HVM but with additional paravirtualized drivers to offload more processes to the host and increase VM performance. This type is typically used to run Microsoft Windows guests with a limited performance penalty.

When Oracle VM servers are installed in Oracle VM VirtualBox, only PVMs can be created in Oracle VM servers.

Notes on templates:

  • An Oracle VM Template is a prebuilt "VM image" that can be imported into Oracle VM and be used to easily and quickly create VMs identical to the template.
  • A template contains an OS image and generally contains databases and applications already installed and configured.
  • You can download many Oracle VM Templates built by Oracle at https://edelivery.oracle.com/oraclevm (requires login).
  • Templates provided by Oracle have an Oracle OS (Oracle Linux or Oracle Solaris).
  • You can also create your own templates using the OS and applications you want.
  • Here, because of time constraints, we will use a very simple template, containing only the Oracle Linux 5 update 7 OS.

Exercise 1: Install Oracle VM Server

In this exercise, you create the first VM by importing the Oracle VM VirtualBox template for Oracle VM Server, and then you start and configure the VM for Oracle VM Server.

Create a VM by Importing the Oracle VM VirtualBox Template for Oracle VM Server

During this step, you create the first Oracle VM VirtualBox virtual machine by importing the pre-existing Oracle VM VirtualBox template OracleVMServer3.1.1build365.ova.

This VM will be our Oracle VM Server. The normal way of installing Oracle VM Server is to boot from an ISO file or CD-ROM, but here we use the template to save time.

  1. In Oracle VM VirtualBox, go to File-> Import Appliance and select the file OracleVMServer3.1.1build365.ova.
  2. In the Appliance settings screen, do the following:

    1. Double-click OracleVMServer3.1.1 and change the name to HOL9870_ovm-srv.
    2. Change CPU to 2.
    3. Change RAM to 2048 MB.
    4. Click Import.
  3. Accept the license agreement.
  4. Wait for the import to complete (about two minutes).
  5. Modify the network settings, as shown in Figure 2:

    1. Go to Network, and click the Adapter 1 tab.
    2. From the Attached to list, select Host-only Adapter.
    3. Expand the Advanced section.
    4. For Promiscuous Mode, select Allow All.

      Make sure you enable the promiscuous mode on the network interfaces. If you do not, your Oracle VM virtual machine will not be accessible from your host machine.

      Figure 2

      Figure 2

    5. Repeat these actions for the Adapter 2 tab.
    6. Click OK to exit the settings.

Start and Configure the VM for Oracle VM Server

  1. In the Oracle VM VirtualBox admin console, select the HOL9870_ovm-srv VM and click Start.
  2. Look at the VM console and wait for the message Enter Static IP address, which is shown in Figure 3.

    Figure 3

    Figure 3

  3. Enter the following information:

    1. For the static IP address, enter 192.168.56.2.
    2. For the netmask, enter 255.255.255.0 (the default).
    3. For the gateway, enter 192.168.56.1.
    4. For the DNS, enter 192.168.56.1.
    5. For the host name, enter ovm-srv.oow.com.
    Notes:
    • We don't have DNS server and DNS domain in place (and we don't need to), but when using the Oracle VM VirtualBox template for Oracle VM Server, we need to enter an IP address for a server. (You can enter any IP address since it will be ignored.)
    • We don't need a network gateway since we used only the Oracle VM VirtualBox internal network, but the template for Oracle VM Server will ask for a gateway IP address. (You can enter any IP address since it will be ignored.)
  4. Your Oracle VM Server is now ready; verify that you see something similar to the following on the console.

    Figure 4

    Figure 4

    Note: The root password for this VM is ovsroot.

  5. To gain access to the mouse, press the rightmost CTRL key on your keyboard and minimize the ovm-srv window.
  6. Important: On your physical machine's native OS, open a new terminal window by selecting Application-> System Tools-> Terminal and run ping 192.168.56.2 to check that the Oracle VM VirtualBox virtual machine is OK.

Exercise 2: Install Oracle VM Manager

In this exercise, you create a second VM by importing the Oracle VM VirtualBox template for Oracle VM Manager, and then you start and configure the VM for Oracle VM Manager.

Create a VM by Importing the Oracle VM VirtualBox Template for Oracle VM Manager

During this step, you create a second Oracle VM VirtualBox virtual machine by importing the pre-existing Oracle VM VirtualBox template, OracleVMManager3.1.1build365.ova.

This VM will be our Oracle VM Manager. The normal way of installing Oracle VM Manager is to install a Linux server (Oracle Linux or Red Hat Linux) and then install Oracle VM Manager from an ISO file or CD-ROM, but here we use the template to save time.

  1. In Oracle VM VirtualBox, select File-> Import Appliance and select the file OracleVMManager3.1.1build365.ova.
  2. In the Appliance Import Settings screen, do the following:

    1. Double-click OracleVMManager3.1.1build365 and change the name to HOL9870_ovm-mgr.
    2. Click Import.

      Note: There is no need to change the RAM (4096 MB) and CPU (1 vcpu) settings.

    3. Accept the license agreement.
    4. Wait for the import to complete (about three minutes).
  3. Modify the network settings:

    1. Select the VM HOL9870_ovm-mgr and click Settings.
    2. Go to Network and click the Adapter 1 tab.
    3. From the Attached to list, select Host-Only Adapter.

    Note: There is no need to set promiscuous mode to "Allow all" for the network interface because no VM will run on the manager.

Start and Configure the VM for Oracle VM Manager

  1. In the Oracle VM VirtualBox admin console, select the HOL9870_ovm-mgr VM and click Start.
  2. Look at the VM console and wait for message New Unix Passwd.
  3. Enter the following information:

    1. For the new password, enter ovsroot twice (same as Oracle VM Server password). Ignore the warning about a bad password, which is shown because the password is not secure.
    2. For the static IP address, enter 192.168.56.3.
    3. For the netmask, enter 255.255.255.0 (the default).
    4. For the gateway, enter 192.168.56.1.
    5. For the DNS server, enter 192.168.56.1.
    6. For the host name, enter ovm-mgr.oow.com.
  4. Wait for the VM to be ready (when the GNOME Desktop is displayed), which takes about two minutes.
  5. To gain access to the mouse, press the rightmost CRTL key on your keyboard and minimize the HOL9870_ovm-mgr window.
  6. On your machine, open a new terminal window by selecting Applications-> Systems Tools-> Terminal, and run ping 192.168.56.3 to check that the Oracle VM VirtualBox VM is OK.
  7. Minimize the Oracle VM Manager window.

Exercise 3: Install the Sun ZFS Storage Appliance Simulator

In this lab, we will run the main Oracle VM operations on a Sun ZFS Storage Appliance (iSCSI access) using the Storage Connect plug-in feature of Oracle VM. This feature enables the storage to be provisioned directly from the Oracle VM admin console (Oracle VM Manager), simplifying global management.

To illustrate this feature, we will use the Storage Connect plug-in for the Sun ZFS Storage Appliance. Many Oracle VM Storage Connect plug-ins are available for storage systems provided by different vendors (see the Oracle VM documentation to get the exact list).

Since we don't have a real Sun ZFS Storage Appliance for this lab, we will use the Sun ZFS Storage Appliance Simulator, which is a tool we can run in an Oracle VM VirtualBox virtual machine.

Create a VM for the Sun ZFS Storage Appliance Simulator

  1. On your physical machine, unzip the file SunStorageVBox.zip. This will create a directory named vbox-2011.1.0.0.1.1.8.
  2. In Oracle VM VirtualBox, go to File-> Import Appliance and select the file Sun ZFS Storage 7000.ovf, which is stored in the directory vbox-2011.1.0.0.1.1.8.
  3. In the Appliance Import Settings screen, do the following:

    1. Double-click Sun_ZFS_Storage_7000 and change the name to HOL9870_zfssa.
    2. Go to Systems and change CPU to 1.
    3. Click Import.
  4. Wait for the import to complete (about two minutes).
  5. Modify the storage settings:

    1. Select the HOL9870_zfssa VM and click Settings.
    2. Go to Storage, select Sun ZFS Storage 7000-disk2.vmdk, and click icon to remove this virtual disk, as shown in Figure 5.

      Figure 5

      Figure 5

    3. Repeat Step 5b to delete Sun ZFS Storage 7000-disk3.vmdk through Sun ZFS Storage 7000-disk16.vmdk.

      Note: By default, the Sun ZFS Storage Appliance simulator has 15 disks (15 virtual disks of 5 GB each). To get better performance on our machine, we will avoid striping data on several virtual disks that are all stored in a single low-performance disk. That's why we deleted the 15 5-GB data disks, and we will next create a single 20-GB disk.

    4. Select SATA Controller and click icon to add a new disk.

      Figure 6

      Figure 6

    5. Create a new disk of type VDI that is dynamically allocated, name it data-disk2, and give it a size of 20 GB.

      Figure 7

      Figure 7

    6. Once the disk has been created, select SATA Controller and make sure you enable Use host I/O cache (for optimized performance).

      Figure 8

      Figure 8

  6. Modify the network settings, as shown in Figure 9:

    1. Go to Network, and click the Adapter 1 tab.
    2. From the Attached to list, select Host-only Adapter.

      Figure 9

      Figure 9

    3. Click OK.

Start and Configure the VM for the Sun ZFS Storage Appliance Simulator

  1. In the Oracle VM VirtualBox admin console, select the HOL9870_zfssa VM and click Start.
  2. Look at the VM console and wait for message Press any key to begin configuring appliance: [*], which is shown in Figure 10.

    Figure 10

    Figure 10

  3. Enter the following information. Use the Tab key to go to next field, and press ESC and 1 when you are finished entering information.

    1. For Host Name, enter zfssa.
    2. For DNS Domain, enter oow.com.
    3. For IP Address, enter 192.168.56.5.
    4. For IP Netmask, enter 255.255.255.0.
    5. For Default Router, enter 192.168.56.1.
    6. For DNS Server, enter 192.168.56.1.
    7. For Password, enter ovsroot.
    Figure 11

    Figure 11

  4. Wait for the VM to finish booting (it is done when you can see zfssa console login), as shown in Figure 12.

    Figure 12

    Figure 12

  5. To gain access to the mouse, press the rightmost CTRL key on your keyboard and minimize the HOL9870_zfssa window.

    Note: As explained on the console, the next steps of the initial configuration will be done in the Sun ZFS Storage Application admin console in a Web browser.

  6. Open a Web browser and open the URL https://192.168.56.5:215.
  7. Ignore security warnings caused by HTTPS for self-signed certificates. (For example, in Firefox, click I understand the Risks, then click Add Exceptions, and then click Confirm Security Exceptions.)
  8. Ignore the message Unsupported Browser, and click Continue.
  9. Log in with username root and password ovsroot.

    Figure 13

    Figure 13

  10. Click Start to start the initial configuration of the Sun ZFS Storage Appliance Simulator.

    Figure 14

    Figure 14

  11. In the Configure Networking (Step 1 of 6) screen, click Commit because no modification is needed.
  12. In the Configure DNS (Step 2 of 6) screen, click Commit because no modification is needed.
  13. In the Configure Time (Step 3 of 6) screen, click Commit because no modification is needed.
  14. In the Configure Name Services (Step 4 of 6) screen, click Commit because no modification is needed.
  15. In the Configure Storage (Step 5 of 6) screen, click icon, as shown in Figure 15, to configure the storage.

    Figure 15

    Figure 15

  16. Name the pool zfspool.

    Figure 16

    Figure 16

  17. Ensure the Data Devices list is set to 1, and click Commit.

    Figure 17

    Figure 17

  18. Ensure Striped is selected for the Data Profile selection (it should be selected automatically since there is only one data disk); then click Commit.

    Figure 18

    Figure 18

  19. In the Configure Storage (Step 5 of 6) screen, click Commit.

    Figure 19

    Figure 19

  20. In the Registration & Support screen, click Later (there is no need to register the product here).
  21. Ignore the warning about not registering. You should now see a message indicating that the system has been successfully configured.

    Figure 20

    Figure 20

Create an iSCSI Target and iSCSI Group on the Sun ZFS Storage Appliance

Before using the Sun ZFS Storage Appliance in Oracle VM Manager, we need to create a dedicated iSCSI target and iSCSI group.

  1. At the top of the screen, go to Configuration-> SAN-> iSCSI Targets.
  2. Click icon to create a new iSCSI target.

    Figure 21

    Figure 21

  3. Leave all parameters as the default values except give a name (alias) to the new iSCSI target, for example, ovm-iscsi-target, as shown in Figure 22.

    Note: You can choose any name you want, but you will have to enter the exact same name later in Oracle VM Manager.

    Figure 22

    Figure 22

  4. Click OK to create the iSCSI target.

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

    Figure 23

    Figure 23

  5. Drag and drop the iSCSI target that was just created to the iSCSI Target Groups panel (on the right) to create an iSCSI group named targets-0:

    1. Move the mouse pointer in front of icon.
    2. Press the left mouse button.
    3. While keeping the left mouse button pressed, move the mouse pointer to the right (below the default entry in the iSCSI Target Groups panel).
    4. Release the left mouse button.
    Figure 24

    Figure 24

  6. Select the group targets-0 and click icon to edit (rename) it.
  7. Change the name, for example, to ovm-iscsi, and click OK.

    Figure 25

    Figure 25

    You should now see both the iSCSI target ovm-iscsi-target and the iSCSI target group ovm-iscsi, as shown in Figure 26.

    Figure 26

    Figure 26

  8. Finally, click Apply to actually create the iSCSI target and the iSCSI target group.

Exercise 4: Install the Storage Connect Plug-in for the Sun ZFS Storage Appliance

The installation of the Storage Connect plug-in consists of several actions:

  • Installation of an RPM on Oracle VM Server
  • Installation of workflows on the Sun ZFS Storage Appliance (already done in the Sun ZFS Storage Appliance Simulator we're using)
  • On the Sun ZFS Storage Appliance, creation of a dedicated user if the appliance is shared with other applications (not needed in this lab; see the plug-in documentation you are if interested in more details)
  • On the Sun ZFS Storage Appliance, creation of an iSCSI target and an iSCSI group to be used by Oracle VM (done previously)
  1. On your physical machine, go to Applications-> System and open a new terminal window.
  2. Unzip the file ZFSSA_storage_connect_plugin_1.0.1_for_OVM_p13559479_120_Generic.zip, which will create three files:

    • readme.txt
    • OVMPLugin.zip
    • ZFSSAWorkflows.zip
  3. Unzip the file OVMPlugin.zip, which will create two files:

    • OVMPluginAdminGuide.pdf (documentation)
    • osc-oracle-s7k-0.1.2-45.el5.noarch.rpm (RPM to install on Oracle VM Server)
  4. Install the RPM file on Oracle VM Server by opening a new terminal window from the physical machine and running the following commands:

    $ scp osc-oracle-s7k-0.1.2-45.el5.noarch.rpm root@192.168.56.2:/tmp
    $ ssh root@192.168.56.2
    [root@ovm-srv ~]# rpm -ivh /tmp/osc-oracle-s7k-0.1.2-45.el5.noarch.rpm
    
  5. Fix a bug on Oracle VM Server (which is present only in Oracle VM Server created from build 365):

    1. Edit the file initiatorname.iscsi:

      root@ovm-srv /]# vi /etc/iscsi/initiatorname.iscsi
      
    2. Add InitiatorName= at the front of the first line, so the line looks like this:

      InitiatorName=iqn.1988-12.com.oracle:66624642f860
      
    3. Restart the iscsid service and exit the terminal session:

      [root@ovm-srv /]# service iscsid restart
      [root@ovm-srv /]# exit
      

Exercise 5: Configure Oracle VM Manager

In this exercise, you perform several steps that configure Oracle VM Manager.

Discover the Oracle VM Server in Oracle VM Manager

  1. Connect to the Oracle VM Manager Web console:

    1. In the Web browser you previously launched on your physical machine's native OS, open a new tab and connect to the Oracle VM Manager console using the URL http://192.168.56.3:7001/ovm/console.
    2. Log in using user admin and password Welcome1.

      You should now see the Oracle VM Manager console shown in Figure 27.

      Figure 27

      Figure 27

  2. Discover Oracle VM Server:

    1. Click icon.
    2. Leave 8899 for the Oracle VM Agent Port.
    3. Enter ovsroot for the Oracle VM Agent Password.
    4. Enter 192.168.56.2 for the IP Address.
    5. Click OK to launch the discovery.
    6. Wait a few seconds. You should now see the server, named ovm-srv.oow.com, in Unassigned Servers.
    7. Click the server to see server information (CPU, memory, and so on).

      Figure 28

      Figure 28

Configure the Oracle VM Networks

Oracle VM has a number of network channels: Server Management, Live Migrate, Cluster Heartbeat, Virtual Machine, and Storage. The 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 the Virtual Machine and Storage roles to the default network.

  1. Modify networks:

    1. Click the Networking tab.
    2. Select network 192.168.56.0 and click icon to edit the network properties.
    3. In the Network Channels list, select the checkboxes Virtual Machine and Storage.

      Figure 29

      Figure 29

    4. Leave all other parameters as the default values by clicking Next-> Next-> Next-> Finish.
  2. Create VNICs:

    The VNIC Manager creates 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.

    1. In the Networking tab, click Virtual NICs.
    2. Click Auto-Fill and then Create.

      This will create 20 VNICs using MAC addresses 00:21:f6:00:00:00 to 00:21:f6:00:00:13. You should now see those VNICs listed.

      Figure 30

      Figure 30

Discover the Sun ZFS Storage Appliance Simulator in Oracle VM Manager

  1. On your Oracle VM Manager console (in your Web browser), go to the Storage tab.
  2. Right-click SAN Servers, and then click Discover SAN Server.

    Figure 31

    Figure 31

  3. Enter the following information in the Discover SAN Server window, as shown in Figure 32:

    1. For Name, enter zfssa.
    2. For Storage Type, enter iSCSI Storage Server.
    3. For Storage Plug-in, enter Sun ZFS Storage Appliance SCSI.
    4. For Plug-in Private Data, enter OVM-iSCSI,OVM-iSCSI-Target. Be careful to enter the exact same names (case sensitive) of the iSCSI target and iSCSI group you created previously.
    5. For Admin Host, enter 192.168.56.5.
    6. For Admin Username, enter root.
    7. For Admin Password, enter ovsroot.
    8. For Access Host (IP) Address, enter 192.168.56.5.
    9. Leave Access Port blank.
    Figure 32

    Figure 32

  4. Click Next.
  5. Click icon to add our server as an admin server for this storage.

    Figure 33

    Figure 33

  6. Finally, click Finish.

    You should now see the Sun ZFS Storage Appliance listed, as shown in Figure 34.

    Figure 34

    Figure 34

Create Two LUNs on the Sun ZFS Storage Appliance

  1. In the Oracle VM Manager console, go to the Storage tab, and then go to SAN Servers and select the new array, zfssa.
  2. In the right panel, click icon to create a new physical disk (that is, a new LUN). (Check that the selected Perspective is Physical Disks.)
  3. Enter LUN0 for the name and enter 10 for the size (in GB).

    Figure 35

    Figure 35

  4. Click OK to create the LUN.
  5. Create another physical disk named LUN1 with a size of 10 GB.

    You should now see two LUNs, as shown in Figure 36.

    Figure 36

    Figure 36

  6. From your browser, in the Sun ZFS Storage Appliance admin console, go to Shares and check that both LUNs were actually created.

    Figure 37

    Figure 37

  7. Enable write cache on the Sun ZFS Storage Appliance to get better performance:

    • Enabling the write cache allows better performance for write I/O operations, but will result in data loss/corruption in the event of an abnormal shutdown of the physical machine (which is OK since we are only building a demo environment here).
    • Better performance is needed on the Sun ZFS Storage Appliance Simulator when virtual disks are written on a single slow physical disk (for example, a 5400 rpm disk on a laptop).
    • On a real physical Sun ZFS Storage Appliance, write cache is enabled by default because the array has a physical memory cache.
    1. On the Sun ZFS Storage Appliance admin console, edit the LUN0 parameter by clicking icon.

      Figure 38

      Figure 38

    2. Go to Protocols, and select the Write cache enabled checkbox (under Write Cache Behavior).

      Figure 39

      Figure 39

    3. Click Apply.
    4. Repeat Step 7a through 7c for LUN1.
  8. In Oracle VM Manager, present both LUNs to the default Access group:

    1. Go back to the Storage tab.
    2. Select the zfssa SAN server.
    3. Select Access Groups from the Perspective list.
    4. Select default and then right-click and select Present-Unpresent.

      Figure 40

      Figure 40

  9. Click icon to add LUN0 and LUN1 to the Selected Physical Disks panel and click OK.

    Figure 41

    Figure 41

  10. In the Servers and VMs tab, right-click server ovm-srv.oow.com and select Rescan Physical disks. Then click OK to confirm rescan.

    Figure 42

    Figure 42

Create a Clustered Server Pool

An Oracle VM server pool contains a group of Oracle VM Servers, which as a group perform virtual machine management tasks, such as ensuring high availability (HA), implementing resource and power management policies, and providing access to networking, storage, and repositories.

The virtual machines running on a server can be "live migrated" 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.

A clustered server pool needs dedicated storage (NFS file system or iSCSI LUN or FC LUN) with a size of at least 10 GB. This server pool file system is used to hold the server pool and cluster data, and it is also used for Cluster Heartbeat.

A non-clustered pool can have only one server. In a clustered pool with at least two servers, one of the servers is the called the master server, and it is in charge of several administrative tasks. In case this server fails, another will take the master server pool role and get its IP address.

Note: Here, for the purpose of this lab, we will create a clustered server pool that will have only one server, and we will use LUN0 of the Sun ZFS Storage Appliance as the shared LUN. This is not a recommended configuration. A pool should have at least two servers.

Perform the following steps to create a clustered server pool using the Oracle VM server:

  1. In Oracle VM Manager, go to the Servers and VMs tab.
  2. Click icon to create a new server pool, as shown in Figure 43.

    Figure 43

    Figure 43

  3. For Name, enter clusterpool.
  4. For Virtual IP Address for the Pool, enter 192.168.56.4.
  5. Select Clustered Server Pool.

    Figure 44

    Figure 44

  6. Select Physical Disk for the storage server pool, click icon, and select LUN0.

    Figure 45

    Figure 45

  7. Click Next.
  8. In the next window, click icon to add all servers (here there is only one) to the pool, and click Finish.

    You should now see the server pool and our Oracle VM Server, ovm-srv, in it.

    Figure 46

    Figure 46

Create a Storage Repository on the Sun ZFS Storage Appliance LUN

Before creating VMs hosted on the server pool, we need to create at least one storage repository to store not only the VMs' files but also ISO files, templates, and so on.

  1. Click the Repositories tab.
  2. Click icon to create a new storage repository.
  3. Enter the following information, as shown in Figure 47:

    1. For Repository Name, enter myrepo.
    2. For Repository Location, select Physical Disk.
    3. For Server Pool, select clusterpool.
    4. For Physical Disk, click icon and select LUN1.

      Figure 47

      Figure 47

      Note: Only unused and unpartitioned LUNs can be used.

  4. Click Next.

    Note: The creation of the repository will take about four minutes because of I/O contention on the disk of the physical machine. During this time, you can go to the Sun ZFS Storage Appliance admin console and see activity (for CPU, disk, iSCSI, and so on) under Status.

    Figure 48

    Figure 48

  5. Go back to Oracle VM Manager and click icon to present this repository to all servers (here, there is only one), and then click Finish.
  6. 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) is created on the repository.

  7. You should now see the new repository; click icon to expand it.

    Figure 49

    Figure 49

Set Up an HTTP Web Server

Importing objects (templates, ISO images, and so on) into Oracle VM can be done in several ways:

  • HTTP Web server using syntax such as http://host[:port]/path/file
  • Anonymous FTP server using syntax such as ftp://host[:port]/path/file
  • Authenticated FTP server using syntax such as ftp://user:password@host[:port]/path/file

In this lab, we will use an HTTP Web server (Apache2) already running on Oracle VM Manager.

  1. On your physical machine's native OS, open a new terminal window and run the following commands to create a directory to store the files that will be imported later:

    Note: The password is ovsroot.

    $ ssh root@192.168.56.3                   
    # mkdir /var/www/html/files
    # chmod 777 /var/www/html/files
    # exit
    

    Reminder: If you are using Microsoft Windows on your physical machine, you will need tools to replace ssh and scp (PuTTY and WinSCP, for instance).

  2. From your terminal window, transfer the OVM_OL5U7_X86_64_PVM_10GB.tgz file to Oracle VM Manager using scp (if your OS is Linux, Oracle Solaris, or Mac OS; if your OS is Windows, use WinSCP):

    $ scp OVM_OL5U7_X86_64_PVM_10GB.tgz root@192.168.56.3:/var/www/html/files
    
  3. On your physical machine's native OS, start a Web browser and open the URL http://192.168.56.3/files to verify that the Web server is working.
  4. Leave the browser open, because you will need it later. 

Import the Oracle Linux 5 Update 7 PVM Template

  1. Go to the Repositories tab.
  2. Expand Repositories and myrepo.
  3. Click VM Templates.
  4. Click icon.

    Figure 50

    Figure 50

  5. Enter the URL of the file to be imported: http://192.168.56.3/files/OVM_OL5U7_X86_64_PVM_10GB.tgz.

    Figure 51

    Figure 51

  6. Click OK to start the import.

    The import should take about five minutes and consists of two steps: downloading and unpacking. You can follow progress in the Job summary panel. Once the import is finished, you should see the template in VM Templates, as shown in Figure 52.

    Figure 52

    Figure 52

  7. Edit the template by clicking icon:

    1. For Memory, replace 2048 MB with 1024 MB.
    2. For Max. Processors, replace 2 with 1.

      Figure 53

      Figure 53

  8. In the Networks tab, add network 192.168.56.0 to the Select Ethernet Networks panel, and click OK.

    Figure 54

    Figure 54

Create a VM Based on the Imported Template

  1. Before going on, check that the template import is finished and make sure that all template modifications (CPU, memory, network) are done.
  2. In the Oracle VM Manager Web console, go to the Servers and VMs tab.
  3. Expand the server pool and right-click the server ovm-srv.oow.com.
  4. Click Create Virtual Machine.
  5. Select Clone from an existing VM Template and enter the following information:

    1. Select myrepo as the repository.
    2. Select OVM_OL5U7_X86_64_PVM_10GB.tgz as the VM template.
    3. Enter guest-vm for the VM name.
    4. Select clusterpool as the server pool.

      Figure 55

      Figure 55

  6. Click Finish to start the VM creation.

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

  7. The guest-vm VM's status should now be shown as Stopped, as shown in Figure 56.

    Figure 56

    Figure 56

Start the guest-vm Virtual Machine

  1. Select the guest-vm VM and start the VM by clicking icon.
  2. Click icon to launch the VM console.
  3. If needed, allow pop-ups in your Web browser.
  4. Tell the browser to use /usr/bin/java/jre1.7.0_04/bin/javaws (installed with the JRE) to open .jnlp files (necessary only the first time you open a VM console).

    Figure 57

    Figure 57

  5. Allow the VM to boot in the console and then enter the following information when asked:

    Note: Ignore the warning about a bad password.

    1. For New Unix root Password, enter ovsroot.
    2. For Enable DHCP, enter n.
    3. For IP address, enter 192.168.56.11.
    4. For IP netmask, enter 255.255.255.0.
    5. For IP gateway, enter 192.168.56.1.
    6. For IP address for DNS server, enter 192.168.56.1.
    7. For Hostname.domainname, enter guest-vm.oow.com.
  6. Now, you can log on to this VM from a terminal window, for example, by running the following command for Linux machines:

    $ ssh root@192.168.56.11
    
  7. When ready, shut down the VM (to save resources).

    [root@guest-vm ]# halt
    

This concludes this hands-on lab.

See Also

About the Authors

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

Acknowledgments

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

Revision 1.0, 02/03/2013

facebook banner twitter banner