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 (7)
I wonder: is it possible to add a VM created like this afterward into the Oracle VM Manager too?
Posted by Henk Bokhoven | May 14, 2008 9:30 AM
Posted on May 14, 2008 09:30
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 | May 14, 2008 9:36 AM
Posted on May 14, 2008 09:36
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 | October 9, 2008 2:24 AM
Posted on October 9, 2008 02:24
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 | October 23, 2008 9:30 PM
Posted on October 23, 2008 21:30
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 | January 21, 2009 6:46 PM
Posted on January 21, 2009 18:46
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 | February 3, 2009 8:04 AM
Posted on February 3, 2009 08:04
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 | March 4, 2009 2:51 AM
Posted on March 4, 2009 02:51