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.

Comments:

I wonder: is it possible to add a VM created like this afterward into the Oracle VM Manager too?

Posted by Henk Bokhoven on May 14, 2008 at 02:30 AM DDUT #

I think it is possible to import a running virtual machine created in Oracle VM Server into Oracle VM Manager. I'll investigate and make that a topic for a later blog. Thanks for the feedback. For those that might not know, you can use Oracle VM Manager to create virtual machines as well, and that's a blog I'm in the process of writing, so stay tuned for that. For the moment I'm just sticking with Oracle VM Server to show all the possible options. Alison

Posted by Alison Holloway on May 14, 2008 at 02:36 AM DDUT #

Any suggestions yet on getting a VM created in this manner registered into VM Manager? I'm not having much success attempting to use the import Thanks, Jason

Posted by Jason Sears on October 08, 2008 at 07:24 PM DDUT #

Importing a template using VM Manager is REALLY SLOW, I have gigabit network and importing via FTP and network utilisation is minimal. Havent tried the manual import though, using VM Manager is unusable

Posted by Michael Quinn on October 23, 2008 at 02:30 PM DDUT #

Hello, I installed Oracle Enterprise Linux 4 U4 some days ago as a virtual machine via your description and would like to have the possibility to manage it now with Oracle VM Manager. So I'm very interested in hearing what you found out about this matter during your investigation of importing a running virtual machine created in Oracle VM Server into Oracle VM Manager yet. Lars.

Posted by Lars Puschmann on January 21, 2009 at 10:46 AM DDUT #

Hi Alison, I want to create a windows server 2008 virtual machine on top of Oracle VM. Do you know any information about that? How to start? Thank you for help! Thanks, Huijun Yan

Posted by Huijun Yan on February 03, 2009 at 12:04 AM DDUT #

When I start the VM I get an error: Error: ('xxxx-xxx-xxx-xxx-xxx', 'VM_metrics'). Any take on what's going on?

Posted by John on March 03, 2009 at 06:51 PM DDUT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

A blog on Oracle VM, PHP and any other projects I work on.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today