Skip to content

XCP Tutorial – Building a HVM Guest using Command Lines

I am back with new information on XCP and the steps I used to launch a HVM guest from a CD on my XCP server. I will also be adding another blog posting about the memory issues I faced during this procedure but are probably not a common issue for most people with large enough servers.

GOAL – Use the Command Line Interface to build and launch a HVM guest from a CD of Oracle Enterprise Linux Release 5 Vol 4 for x86 (32-bit)

Step 1 - Connect to XCP Server from remote machine; I opened a terminal window and entered the following command: ssh -l root IP ADDRESS

stephen@stephen:~/Documents/Blog$ ssh -l root IP ADDRESS
root@IP Address’ password:
Last login: Wed Mar  3 17:33:54 2010 from IP ADDRESS
Type “xsconsole” for access to the management console.
[root@xenserver-reiazupz ~]#

Step 2 – I leveraged the existing XCP documentation found at or (Chapter 4; Page 21).

a) Place the Linux Install CD in the CD drive on the XCP Machine
b) Run the command xe template-list

Results (shortened for required information):
uuid ( RO)                : 5a3ee06c-3078-cec0-015c-a19cf3c7799d
name-label ( RW): Oracle Enterprise Linux 5.0
name-description ( RW): Template that allows VM installation from Xen-aware EL-based distros. To use this template from the CLI, install your VM using vm-install, then set other-config-install-repository to the path to your network repository, e.g. http://<server>/<path> or nfs:server:/<path>

c) Run  xe vm-install template=”<template_name>” new-name-label=<name_for_vm>
* <template_name>
is from above Results, “Oracle Enterprise Linux 5.0″
* <name_for_vm> is your choice, I chose “oraclevm”
RESULTS – The UUID of the new oraclevm => vm_uuid

d) Run xe vbd-list vm-uuid=<vm_uuid> userdevice=0 params=uuid –minimal
RESULTSThe Root Disk UUID => root_disk_uuid

e) xe vbd-param-set uuid=<root_disk_uuid> bootable=false
RESULTS: No Output

f) Run  xe cd-list to get the name  of the CD Drive on the XCP machine
RESULTS: CD Drive name (e.g. SCSI 0:0:0:0) => host_cd_drive_name_label

g) Run xe vm-cd-add vm=<vm_name> cd-name=”<host_cd_drive_name_label>” device=3

h) Run xe vbd-list vm-uuid=<vm_uuid> type=CD params=uuid –minimal
RESULTS: CD VM UUID  => cd_drive_uuid

i) Run xe vbd-param-set uuid=<cd_drive_uuid> bootable=true
RESULTS: No Output

j) Run xe vm-param-set uuid=<vm_uuid> other-config:install-repository=cdrom
RESULTS: No Output

k) Run xe vm-start uuid=<vm_uuid>
RESULTS: No Output

At this point, the VM will start on your XCP machine and you should hear the CD Drive start working. To install the OS within the VM I again chose to use OpenXenCenter and was able to connect easily to my XCP machine and install the OS via the VM Console window. See image below:

As I mentioned at the start of this example, I will be adding another blog to detail the memory issues I had in launching this new VM on my XCP machine. Also, I am still waiting for my Windows 7 CD to arrive in the mail and will post another blog with instructions to launch Windows on XCP.

Be Sociable and Share!

Posted in Community, XCP, Xen Support, Promotion.

Tagged with , , .

5 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. says

    I did exactly the same, but centos 5.5 tells me that it can not find any hard disks and I should load driver, what should I do know?
    I created the VM using centos 5.4 template.

  2. georgefurbee says

    Great read, and this helped me a lot. I am new to the XCP/Xen world. I do however have a question. Is there a way to boot to the WindowsVM on the XCP machine and then run/manage the VM’s with open manager. I have users who only need the Windows part, but we would like to add Linux VM’s and task them while the users just do their normal work. Thanks

Continuing the Discussion

  1. XCP Tutorial – Building a HVM Guest using Command Lines – Blog linked to this post on March 5, 2010

    [...] XCP Tutorial – Building a HVM Guest using Command Lines – Command Prompt Will Not OpenMicrosoft's Command Line Standard | 70-620 Exam – Microsoft …ohnotheydidnt: take a listen ONTD, I command you .Marine Corps News Room: U.S. Redraws Afghan CommandSend Flowers, A How To Guide (Karen Marinelli) « vici blogWar on Terrorism: Send-off ceremonies planned for nearly 400 …Send Sun Load to the Philippines through Internet Loading Sites …wordpress doesnt send email with password to new registrations …Small Wonders send their Puppets to Chile – AppmodoWar News Updates: The New 2nd In Command Of The Taliban Was … View the Contact Powered by Blog [...]

  2. Weekly Newsletter Vol 10 No 9 – linked to this post on March 5, 2010

    [...] Tutorial – Building a HVM Guest from Command Line Interface – Memory Issues with new VMs – Installing a VM Operating System from [...]

  3. XCP Tutorial – Creation of a Windows 7 Guest – linked to this post on March 19, 2010

    [...] for the instructions on creating the VM guest. In the Windows 7 example I changed the name of the [...]

You must be logged in to post a comment.