« September 2007 | Main | May 2008 »

April 2008 Archives

April 11, 2008

Oracle VM

I've been a bit quiet recently. That's because I've been head-down, fingers flying across the keyboard, working on Oracle VM. That's Oracle's virtualization platform, which was released late last year. We've just released the first patch, so now we're up to version 2.1.1. We're positively pumping out product here.

In the coming days I'll be posting some blogs about how to install and use Oracle VM. I hope you find these useful. If there are any topics you want covered, leave me some feedback and I'll get something written for you.

Oh, and I'll be back on updating the Underground PHP and Oracle Manual shortly, so expect a new version soon.

Alison

Installing Oracle VM

This is the first of my Oracle VM blogs. I figured I'd start at the beginning. How to install it.

There's an Oracle VM Quick Start Guide that gives you a bit more information than I've given you here, but not quite as much as the install guides (links given later).


You'll need a machine that supports virtualization. Most newer machines support virtualization, but if you're using an older machine, you might need to use this as an excuse to go shopping. You'll also need at least 2GB RAM if you want to run more than one virtual machine at once. Oracle VM Server has it's own operating system, so it will wipe any existing data on your hard drive. Make sure you install this on a machine that you're happy to have wiped and dedicated to running your virtual machines.

So onto the install part. It's pretty easy. Very easy in fact.

Download the Oracle VM 2.1.1 ISO file.

You'll need both the Oracle VM Server and Oracle VM Manager ISO files:

Oracle VM Server 2.1.1     Part number V12540-01     315M
Oracle VM Manager 2.1.1 Part number V12499-01     534M

Use your favourite CD burner software and burn the Oracle VM Server ISO to a bootable CD.

Then burn the Oracle VM Manager ISO to a CD. This one doesn't need to be bootable.

You don't need to waste DVDs as both installs fit nicely onto a CD.
 
Boot your machine from the Oracle VM Server CD. Follow the prompts during login, and you're away. When the install has finished, log in as "root" with the password you set during the install. Oracle VM Server is installed and ready to go now.

Now, to install Oracle VM Manager. You'll need an Enterprise Linux (either Oracle's or RedHat's) installation. Yes, this needs to be on another machine, though it doesn't wipe out the data, and you can use a lower spec'd machine, any old machine that will handle Enterprise Linux.

Start up the operating system, and mount the CD. Run the installation script as "root":

# sh runInstaller.sh

Follow the prompts during the install and you're done. You can accept the defaults by hitting Enter. A lot of people seem to miss this so I thought it was worthy of pointing out.

If you want more detailed install info, you can get it in these books:

Oracle VM Server Installation Guide
Oracle VM Manager Installation Guide

Now you've got both the Oracle VM Server and Oracle VM Manager installed, you need to let Oracle VM Manager know about the Oracle VM Server.

Open the Oracle VM Manager interface in a web browser:

http://hostname:8888/OVS
Log in as "admin" with the password you set during the installation.

Create a Server Pool.

Add the Oracle VM Server to the Server Pool. You can set whether the Oracle VM Server acts as a Server Pool Master, a Utility Server, and a Virtual Machine Server. If you need to enter a login while doing this, use the "root" password for the Oracle VM Server.

The next blog entry will show you how to create a virtual machine with your newly installed setup.

April 24, 2008

Creating a Guest Virtual Machine with Oracle VM Server

Now you've got Oracle VM Server and Oracle VM Manager installed, you'll obviously want to create a virtual machine. The easiest way is to use one of the preconfigured templates supplied by Oracle. In this example, I'm going to use an Oracle Enterprise Linux Release 5 Update 1 template that is hardware virtualized (fully virtualized) for an x86_64 bit platform.

You can use Oracle VM Manager to create guest virtual machines, but in this example I am going to use the Oracle VM Server command line tools. I'll write an example of creating a virtual machine using Oracle VM Manager in an upcoming blog.

At the end of this install, I will have a hardware virtualized guest (virtual machine) running Oracle Enterprise Linux Release 5 Update 1.

To start off, download the following template from OTN:

OVM_EL5U1_X86_64_HVM_4GB.tgz

There's a readme for these templates which gives more information that I give you here if you get stuck or want to know more.

You can put the template onto an FTP or HTTP server, and import it into Oracle VM Server from there, or, the easiest way for me at least, is to copy it onto a USB drive and mount the drive on the Oracle VM Server box. When you've plugged in the USB drive to your Oracle VM Server, find the mount point by entering:

# dmesg |tail

Look for an entry like:

sdb: sdb1

In this case, the mount point is "sdb1". Once you've worked out where the mount point is, make a directory to mount the USB drive:

# mkdir /mnt/exthdd

Now, use this entry to mount the USB drive with the command:

# mount /dev/sdb1 /mnt/exthdd

Copy the template to the /OVS/templates directory:

# cp /mnt/exthdd/OVM_EL5U1_X86_64_HVM_4BG.tgz /OVS/templates/

Uncompress the template:

# tar -xzf OVM_EL5U1_X86_64_HVM_4GB.tgz

Copy the directory and files that are created into /OVS/seed_pool:

# mkdir /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB
# cp /OVS/templates/OVM_EL5U1_X86_64_HVM_4GB/* /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB/

Edit the /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB/vm.cfg file to make sure it is correct for your setup. Mostly this is just confirming the path to the vm.cfg file.

Create and start the virtual machine using the command:

# xm create /OVS/seed_pool/OVM_EL5U1_X86_64_HVM_4GB/vm.cfg

The virtual machine is created and started. You can see that the virtual machine is running with the xm list command. You should see dom0 and OVM_EL5U1_X86_64_HVM_4GB in the output.

# xm list

You can start and stop virtual machines using the xm command. If you want to shut down a domain, use the xm list command to get the domain ID, then use that to shut it down, for example

# xm shutdown 1

Coming next ... Connecting to the virtual machine.

About April 2008

This page contains all entries posted to Alison Holloway's Blog in April 2008. They are listed from oldest to newest.

September 2007 is the previous archive.

May 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle