by Christophe Pauliat and Olivier Canonge
Published February 2013Prerequisites
This lab is Part 1 of a three-part series that covers a range of topics from storage capacity planning, LUN creation, and network bandwidth planning, to best practices for designing and streamlining an Oracle VM environment that's easy to manage.
This lab uses Oracle VM VirtualBox as your virtual platform. You will install a basic Oracle VM Server for x86 Release 3.1.1 environment (one Oracle VM Manager and one Oracle VM Server) as an image in Oracle VM VirtualBox and then perform some basic operations, such as creating an Oracle VM virtual machine from a template that contains Oracle Linux 5.
We use Oracle VirtualBox as a virtual platform because it lets you host Oracle VM Manager and Oracle VM Server on any x86 machine (a laptop, a desktop, or a server) with any OS (Linux, Oracle Solaris, Microsoft Windows, or Mac OS) without interfering with the existing OS and data on the machine.
Part 2 of this series is "How to Virtualize and Deploy Oracle Applications in Minutes with Oracle VM" and Part 3 is "Deploying a Cloud Infrastructure with Oracle VM 3.x and the Sun ZFS Storage Appliance."
In this lab, we will use Oracle VM VirtualBox to create two virtual machines that will later be used by Oracle VM Server for x86 and Oracle VM Manager, so that we can 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:
Download the following products:
OVM_OL5U7_X86_64_PVM_10GB.tgz(815 GB). Gunzip the file to save time during the lab (new size: 2.44 GB).
Network address: 192.168.56.0
Physical machine's IP address: 192.168.56.1
$ 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 installed 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.
There are three types of virtual machines:
When installing Oracle VM servers in Oracle VM VirtualBox, only PVMs can be created in Oracle VM servers.
Notes on templates:
In this exercise, you create a 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 interface. 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 4.
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 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) or the 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 virtual machine is OK.
In this exercise, you perform several steps that configure Oracle VM Manager.
Welcome1. You should now see the Oracle VM Manager console shown in Figure 6.
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.
You should now see those VNICs listed, as shown in Figure 9.
A 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. Such a pool is called clustered.
Here, for simplicity, we will create a non-clustered server pool with a single server and use a local HDD (hard disk drive) (actually a file on the laptop that is seen by Oracle VM VirtualBox as an HDD).
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 one server, the server is also the master server. In a clustered pool with at least two servers, one of them is the master server. In case of failure on the master server, another server will take the master server pool and get this IP address. If you want to create a clustered server pool (not needed here), you need to have dedicated storage (NFS file system, or iSCSI LUN, or FC LUN) of at least 12 GB.
You should now see the 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 local HDDs can be used.
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.
rootand run the following commands to create a directory to store the files that will be imported later:
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).
$ 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 three minutes and consists of two steps: downloading and unpacking.
You can follow the progress in the Job summary panel. Once the import is finished, you should see the template in VM Templates, as shown in Figure 17.
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/java/jre1.7.0_04/bin/javaws(installed with the JRE) to open
.jnlpfiles (necessary only the first time you open a VM console), as shown in Figure 22.
Note: Ignore the warning about a bad password.
$ ssh firstname.lastname@example.org
[root@guest-vm ]# halt
This concludes this hands-on lab. If you want to go further, see the following labs:
.zipfiles to get the white paper)
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, and Greg King for their contributions.
|Revision 1.0, 02/03/2013|