by Christophe Pauliat and Olivier Canonge
Published February 2013Prerequisites
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.
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
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:
In addition, two kinds of templates are used, so pay close attention to the instructions to ensure you use the right templates:
The minimal configuration needed for your laptop, desktop, or server is as follows:
OVM_OL5U7_X86_64_PVM_10GB.tgz(815 GB). Gunzip the file to save time during the lab (new size: 2.44 GB).
$ su - # rpm -ivh jre-7u4-linux-x64.rpm
In this lab, you will execute the following steps:
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).
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.
There are three types of virtual machines:
When Oracle VM servers are installed in Oracle VM VirtualBox, only PVMs can be created in Oracle VM servers.
Notes on templates:
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.
During this step, you create the first Oracle VM VirtualBox virtual machine by importing the pre-existing Oracle VM VirtualBox template
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.
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.
Enter Static IP address, which is shown in Figure 3.
Note: The root password for this VM is
ping 192.168.56.2to check that the Oracle VM VirtualBox virtual machine is OK.
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.
During this step, you create a second Oracle VM VirtualBox virtual machine by importing the pre-existing Oracle VM VirtualBox template,
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.
Note: There is no need to change the RAM (4096 MB) and CPU (1 vcpu) settings.
Note: There is no need to set promiscuous mode to "Allow all" for the network interface because no VM will run on the manager.
New Unix Passwd.
ping 192.168.56.3to check that the Oracle VM VirtualBox VM is OK.
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.
SunStorageVBox.zip. This will create a directory named
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.
Press any key to begin configuring appliance: [*], which is shown in Figure 10.
zfssa console login), as shown in Figure 12.
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.
Unsupported Browser, and click Continue.
Before using the Sun ZFS Storage Appliance in Oracle VM Manager, we need to create a dedicated iSCSI target and iSCSI group.
Note: You can choose any name you want, but you will have to enter the exact same name later in Oracle VM Manager.
You should now see the iSCSI target named ovm-iscsi-target.
You should now see both the iSCSI target
ovm-iscsi-target and the iSCSI target group
ovm-iscsi, as shown in Figure 26.
The installation of the Storage Connect plug-in consists of several actions:
ZFSSA_storage_connect_plugin_1.0.1_for_OVM_p13559479_120_Generic.zip, which will create three files:
OVMPlugin.zip, which will create two files:
osc-oracle-s7k-0.1.2-45.el5.noarch.rpm(RPM to install on Oracle VM Server)
$ scp osc-oracle-s7k-0.1.2-45.el5.noarch.rpm firstname.lastname@example.org:/tmp $ ssh email@example.com [root@ovm-srv ~]# rpm -ivh /tmp/osc-oracle-s7k-0.1.2-45.el5.noarch.rpm
root@ovm-srv /]# vi /etc/iscsi/initiatorname.iscsi
InitiatorName=at the front of the first line, so the line looks like this:
iscsidservice and exit the terminal session:
[root@ovm-srv /]# service iscsid restart [root@ovm-srv /]# exit
In this exercise, you perform several steps that configure Oracle VM Manager.
You should now see the Oracle VM Manager console shown in Figure 27.
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.
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.
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.
You should now see the Sun ZFS Storage Appliance listed, as shown in Figure 34.
You should now see two LUNs, as shown in Figure 36.
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:
You should now see the server pool and our Oracle VM Server, ovm-srv, in it.
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.
Note: Only unused and unpartitioned LUNs can be used.
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.
Note: For non-NFS storage (which is our case here), an OCFS2 (Oracle Cluster File System) is created on the repository.
Importing objects (templates, ISO images, and so on) into Oracle VM can be done in several ways:
In this lab, we will use an HTTP Web server (Apache2) already running on Oracle VM Manager.
Note: The password is ovsroot.
$ ssh firstname.lastname@example.org # 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
scp (PuTTY and WinSCP, for instance).
OVM_OL5U7_X86_64_PVM_10GB.tgzfile 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 email@example.com:/var/www/html/files
http://192.168.56.3/filesto verify that the Web server is working.
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.
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.
/usr/bin/java/jre1.7.0_04/bin/javaws(installed with the JRE) to open
.jnlpfiles (necessary only the first time you open a VM console).
Note: Ignore the warning about a bad password.
$ ssh firstname.lastname@example.org
[root@guest-vm ]# halt
This concludes this hands-on lab.
.zipfiles to get the
Christophe Pauliat and Olivier Canonge are Systems Sales Consultants for Oracle in France.
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|