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
Latest version of Oracle VM VirtualBox (4.1.18 at the time of this writing), which is about 90 MB. Also download the extension pack, which is very small and common to all platforms.
The Java runtime environment (JRE) that is appropriate for your native operating system; for example, for Linux RPM x64 (64-bit version), it would be jre-7u4-linux-x64.rpm (20 MB).
Install the Primary OS and Oracle VM VirtualBox
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.
Install Oracle VM VirtualBox.
Install the Oracle VM VirtualBox extension pack:
Run Oracle VM VirtualBox.
Then select File-> Preferences-> Extensions, and click .
In Oracle VM VirtualBox, configure a host-only network:
Select File-> Preferences-> Network.
Specify the following:
Network address: 192.168.56.0
Physical machine's IP address: 192.168.56.1
Netmask: 255.255.255.0
Disable the DHCP server since we will not use it.
Open a terminal window on your physical machine.
Install the JRE on your physical machine. For example, on a Linux machine, run the following command:
Copied to Clipboard
Error: Could not Copy
$ su -
# rpm -ivh jre-7u4-linux-x64.rpm
Restart your Web browser.
Summary of the Exercises
In this lab, you will execute the following steps:
Exercise 1: Install Oracle VM Server 3.1.1 in an Oracle VM VirtualBox virtual machine from an Oracle VM VirtualBox template (.ova file).
Exercise 2: Install Oracle VM Manager 3.1.1 in an Oracle VM VirtualBox virtual machine from an Oracle VM VirtualBox template.
Exercise 3: Install the Sun ZFS Storage Appliance Simulator in an Oracle VM VirtualBox virtual machine from an Oracle VM VirtualBox template.
Exercise 4: Install the Sun ZFS Storage Appliance Storage Connect plug-in in Oracle VM.
Exercise 5: Configure Oracle VM Manager:
Discover the Oracle VM Server.
Configure the network and virtual network interface cards (VNICs).
Discover the Sun ZFS Storage Appliance Simulator.
Create two Sun ZFS Storage Appliance LUNs from the Oracle VM admin console.
Create a clustered server pool using the first ZFS Storage Appliance LUN.
Create a storage repository using the second ZFS Storage Appliance LUN.
Set up an HTTP Web server.
Import an Oracle VM Template into the repository.
Create an Oracle VM (OVM) virtual machine based on the imported template.
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
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.
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.
In Oracle VM VirtualBox, go to File-> Import Appliance and select the file OracleVMServer3.1.1build365.ova.
In the Appliance settings screen, do the following:
Double-click OracleVMServer3.1.1 and change the name to HOL9870_ovm-srv.
Change CPU to 2.
Change RAM to 2048 MB.
Click Import.
Accept the license agreement.
Wait for the import to complete (about two minutes).
Modify the network settings, as shown in Figure 2:
Go to Network, and click the Adapter 1 tab.
From the Attached to list, select Host-only Adapter.
Expand the Advanced section.
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
Repeat these actions for the Adapter 2 tab.
Click OK to exit the settings.
Start and Configure the VM for Oracle VM Server
In the Oracle VM VirtualBox admin console, select the HOL9870_ovm-srv VM and click Start.
Look at the VM console and wait for the message Enter Static IP address, which is shown in Figure 3.
Figure 3
Enter the following information:
For the static IP address, enter 192.168.56.2.
For the netmask, enter 255.255.255.0 (the default).
For the gateway, enter 192.168.56.1.
For the DNS, enter 192.168.56.1.
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.)
Your Oracle VM Server is now ready; verify that you see something similar to the following on the console.
Figure 4
Note: The root password for this VM is ovsroot.
To gain access to the mouse, press the rightmost CTRL key on your keyboard and minimize the ovm-srv window.
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.
In Oracle VM VirtualBox, select File-> Import Appliance and select the file OracleVMManager3.1.1build365.ova.
In the Appliance Import Settings screen, do the following:
Double-click OracleVMManager3.1.1build365 and change the name to HOL9870_ovm-mgr.
Click Import.
Note: There is no need to change the RAM (4096 MB) and CPU (1 vcpu) settings.
Accept the license agreement.
Wait for the import to complete (about three minutes).
Modify the network settings:
Select the VM HOL9870_ovm-mgr and click Settings.
Go to Network and click the Adapter 1 tab.
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
In the Oracle VM VirtualBox admin console, select the HOL9870_ovm-mgr VM and click Start.
Look at the VM console and wait for message New Unix Passwd.
Enter the following information:
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.
For the static IP address, enter 192.168.56.3.
For the netmask, enter 255.255.255.0 (the default).
For the gateway, enter 192.168.56.1.
For the DNS server, enter 192.168.56.1.
For the host name, enter ovm-mgr.oow.com.
Wait for the VM to be ready (when the GNOME Desktop is displayed), which takes about two minutes.
To gain access to the mouse, press the rightmost CRTL key on your keyboard and minimize the HOL9870_ovm-mgr window.
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.
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
On your physical machine, unzip the file SunStorageVBox.zip. This will create a directory named vbox-2011.1.0.0.1.1.8.
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.
In the Appliance Import Settings screen, do the following:
Double-click Sun_ZFS_Storage_7000 and change the name to HOL9870_zfssa.
Go to Systems and change CPU to 1.
Click Import.
Wait for the import to complete (about two minutes).
Modify the storage settings:
Select the HOL9870_zfssa VM and click Settings.
Go to Storage, select Sun ZFS Storage 7000-disk2.vmdk, and click to remove this virtual disk, as shown in Figure 5.
Figure 5
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.
Select SATA Controller and click to add a new disk.
Figure 6
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
Once the disk has been created, select SATA Controller and make sure you enable Use host I/O cache (for optimized performance).
Figure 8
Modify the network settings, as shown in Figure 9:
Go to Network, and click the Adapter 1 tab.
From the Attached to list, select Host-only Adapter.
Figure 9
Click OK.
Start and Configure the VM for the Sun ZFS Storage Appliance Simulator
In the Oracle VM VirtualBox admin console, select the HOL9870_zfssa VM and click Start.
Look at the VM console and wait for message Press any key to begin configuring appliance: [*], which is shown in Figure 10.
Figure 10
Enter the following information. Use the Tab key to go to next field, and press ESC and 1 when you are finished entering information.
For Host Name, enter zfssa.
For DNS Domain, enter oow.com.
For IP Address, enter 192.168.56.5.
For IP Netmask, enter 255.255.255.0.
For Default Router, enter 192.168.56.1.
For DNS Server, enter 192.168.56.1.
For Password, enter ovsroot.
Figure 11
Wait for the VM to finish booting (it is done when you can see zfssa console login), as shown in Figure 12.
Figure 12
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.
Open a Web browser and open the URL https://192.168.56.5:215.
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.)
Ignore the message Unsupported Browser, and click Continue.
Log in with username root and password ovsroot.
Figure 13
Click Start to start the initial configuration of the Sun ZFS Storage Appliance Simulator.
Figure 14
In the Configure Networking (Step 1 of 6) screen, click Commit because no modification is needed.
In the Configure DNS (Step 2 of 6) screen, click Commit because no modification is needed.
In the Configure Time (Step 3 of 6) screen, click Commit because no modification is needed.
In the Configure Name Services (Step 4 of 6) screen, click Commit because no modification is needed.
In the Configure Storage (Step 5 of 6) screen, click , as shown in Figure 15, to configure the storage.
Figure 15
Name the pool zfspool.
Figure 16
Ensure the Data Devices list is set to 1, and click Commit.
Figure 17
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
In the Configure Storage (Step 5 of 6) screen, click Commit.
Figure 19
In the Registration & Support screen, click Later (there is no need to register the product here).
Ignore the warning about not registering. You should now see a message indicating that the system has been successfully configured.
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.
At the top of the screen, go to Configuration-> SAN-> iSCSI Targets.
Click to create a new iSCSI target.
Figure 21
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
Click OK to create the iSCSI target.
You should now see the iSCSI target named ovm-iscsi-target.
Figure 23
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:
Move the mouse pointer in front of .
Press the left mouse button.
While keeping the left mouse button pressed, move the mouse pointer to the right (below the default entry in the iSCSI Target Groups panel).
Release the left mouse button.
Figure 24
Select the group targets-0 and click to edit (rename) it.
Change the name, for example, to ovm-iscsi, and click OK.
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
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)
On your physical machine, go to Applications-> System and open a new terminal window.
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
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)
Install the RPM file on Oracle VM Server by opening a new terminal window from the physical machine and running the following commands:
Fix a bug on Oracle VM Server (which is present only in Oracle VM Server created from build 365):
Edit the file initiatorname.iscsi:
Copied to Clipboard
Error: Could not Copy
root@ovm-srv /]# vi /etc/iscsi/initiatorname.iscsi
Add InitiatorName= at the front of the first line, so the line looks like this:
Copied to Clipboard
Error: Could not Copy
InitiatorName=iqn.1988-12.com.oracle:66624642f860
Restart the iscsid service and exit the terminal session:
Copied to Clipboard
Error: Could not Copy
[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
Connect to the Oracle VM Manager Web console:
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.
Log in using user admin and password Welcome1.
You should now see the Oracle VM Manager console shown in Figure 27.
Figure 27
Discover Oracle VM Server:
Click .
Leave 8899 for the Oracle VM Agent Port.
Enter ovsroot for the Oracle VM Agent Password.
Enter 192.168.56.2 for the IP Address.
Click OK to launch the discovery.
Wait a few seconds. You should now see the server, named ovm-srv.oow.com, in Unassigned Servers.
Click the server to see server information (CPU, memory, and so on).
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.
Modify networks:
Click the Networking tab.
Select network 192.168.56.0 and click to edit the network properties.
In the Network Channels list, select the checkboxes Virtual Machine and Storage.
Figure 29
Leave all other parameters as the default values by clicking Next-> Next-> Next-> Finish.
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.
In the Networking tab, click Virtual NICs.
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
Discover the Sun ZFS Storage Appliance Simulator in Oracle VM Manager
On your Oracle VM Manager console (in your Web browser), go to the Storage tab.
Right-click SAN Servers, and then click Discover SAN Server.
Figure 31
Enter the following information in the Discover SAN Server window, as shown in Figure 32:
For Name, enter zfssa.
For Storage Type, enter iSCSI Storage Server.
For Storage Plug-in, enter Sun ZFS Storage Appliance SCSI.
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.
For Admin Host, enter 192.168.56.5.
For Admin Username, enter root.
For Admin Password, enter ovsroot.
For Access Host (IP) Address, enter 192.168.56.5.
Leave Access Port blank.
Figure 32
Click Next.
Click to add our server as an admin server for this storage.
Figure 33
Finally, click Finish.
You should now see the Sun ZFS Storage Appliance listed, as shown in Figure 34.
Figure 34
Create Two LUNs on the Sun ZFS Storage Appliance
In the Oracle VM Manager console, go to the Storage tab, and then go to SAN Servers and select the new array, zfssa.
In the right panel, click to create a new physical disk (that is, a new LUN). (Check that the selected Perspective is Physical Disks.)
Enter LUN0 for the name and enter 10 for the size (in GB).
Figure 35
Click OK to create the LUN.
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
From your browser, in the Sun ZFS Storage Appliance admin console, go to Shares and check that both LUNs were actually created.
Figure 37
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.
On the Sun ZFS Storage Appliance admin console, edit the LUN0 parameter by clicking .
Figure 38
Go to Protocols, and select the Write cache enabled checkbox (under Write Cache Behavior).
Figure 39
Click Apply.
Repeat Step 7a through 7c for LUN1.
In Oracle VM Manager, present both LUNs to the default Access group:
Go back to the Storage tab.
Select the zfssa SAN server.
Select Access Groups from the Perspective list.
Select default and then right-click and select Present-Unpresent.
Figure 40
Click to add LUN0 and LUN1 to the Selected Physical Disks panel and click OK.
Figure 41
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
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:
In Oracle VM Manager, go to the Servers and VMs tab.
Click to create a new server pool, as shown in Figure 43.
Figure 43
For Name, enter clusterpool.
For Virtual IP Address for the Pool, enter 192.168.56.4.
Select Clustered Server Pool.
Figure 44
Select Physical Disk for the storage server pool, click icon, and select LUN0.
Figure 45
Click Next.
In the next window, click 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
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.
Click the Repositories tab.
Click to create a new storage repository.
Enter the following information, as shown in Figure 47:
For Repository Name, enter myrepo.
For Repository Location, select Physical Disk.
For Server Pool, select clusterpool.
For Physical Disk, click and select LUN1.
Figure 47
Note: Only unused and unpartitioned LUNs can be used.
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
Go back to Oracle VM Manager and click to present this repository to all servers (here, there is only one), and then click Finish.
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.
You should now see the new repository; click to expand it.
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.
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:
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).
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):
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.
Leave the browser open, because you will need it later.
Import the Oracle Linux 5 Update 7 PVM Template
Go to the Repositories tab.
Expand Repositories and myrepo.
Click VM Templates.
Click .
Figure 50
Enter the URL of the file to be imported: http://192.168.56.3/files/OVM_OL5U7_X86_64_PVM_10GB.tgz.
Figure 51
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
Edit the template by clicking :
For Memory, replace 2048 MB with 1024 MB.
For Max. Processors, replace 2 with 1.
Figure 53
In the Networks tab, add network 192.168.56.0 to the Select Ethernet Networks panel, and click OK.
Figure 54
Create a VM Based on the Imported Template
Before going on, check that the template import is finished and make sure that all template modifications (CPU, memory, network) are done.
In the Oracle VM Manager Web console, go to the Servers and VMs tab.
Expand the server pool and right-click the server ovm-srv.oow.com.
Click Create Virtual Machine.
Select Clone from an existing VM Template and enter the following information:
Select myrepo as the repository.
Select OVM_OL5U7_X86_64_PVM_10GB.tgz as the VM template.
Enter guest-vm for the VM name.
Select clusterpool as the server pool.
Figure 55
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.
The guest-vm VM's status should now be shown as Stopped, as shown in Figure 56.
Figure 56
Start the guest-vm Virtual Machine
Select the guest-vm VM and start the VM by clicking .
Click to launch the VM console.
If needed, allow pop-ups in your Web browser.
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
Allow the VM to boot in the console and then enter the following information when asked:
Note: Ignore the warning about a bad password.
For New Unix root Password, enter ovsroot.
For Enable DHCP, enter n.
For IP address, enter 192.168.56.11.
For IP netmask, enter 255.255.255.0.
For IP gateway, enter 192.168.56.1.
For IP address for DNS server, enter 192.168.56.1.
For Hostname.domainname, enter guest-vm.oow.com.
Now, you can log on to this VM from a terminal window, for example, by running the following command for Linux machines:
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.