« April 11, 2008 | Main | May 29, 2008 »

April 24, 2008 Archives

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.

April 11, 2008 is the previous archive.

May 29, 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