Xen Cloud Platform (XCP) : Installing Ubuntu 13.04 raring VM

Installing Ubuntu 13.04 raring VM with XCP

Assuming: xcp-xapi installed

1) Start xcp-xapi service

Set toolstack=xapi in /etc/default/xen
root@dom0:~# service xend stop
root@dom0:~# service xcp-xapi start

2) Create SR(storage repository with one device /dev/sdaX)
Here /dev/sda4 is partition created for storage repository.

root@dom0:~# xe sr-create content-type=user device-config:device=/dev/sda4 host-uuid=<host-uuid> name-label=<sr-name> shared=true type=ext

Get host uuid from

root@dom0:~# xe host-list

3) Create Templates

root@dom0:~# /usr/lib/xcp/lib/create_templates
root@dom0:~# xe template-list

4) Create VM

a) Create VM with Ubuntu Lucid template and later we will set it to raring

root@dom0:~# xe vm-install template=Ubuntu\ Lucid\ Lynx\ 10.04\ \(64-bit\) sr-name-label=<sr-name> new-name-label=<vm-name>

b) Get UUID of xenbr0 network

root@dom0:~# xe network-list bridge=xenbr0 --minimal

c) Create virtual interface with xenbr0 network

root@dom0:~# xe vif-create mac=random device=0 network-uuid=<xenbr0-uuid> vm-uuid=<vm-uuid>

d) Set debian release to raring

root@dom0:~# xe vm-param-set other-config:debian-release=raring uuid=<vm-uuid>

e) Set install-repository path

root@dom0:~# xe vm-param-set other-config:install-repository=http://archive.ubuntu.com/ubuntu/ uuid=<vm-uuid>

f) Set disk size for new VM

Here I am setting it to 30 GB

root@dom0:~# xe vm-param-set other-config:disks="<provision><disk device=\"0\" size=\"30589934592\" sr=\"\" bootable=\"true\" type=\"system\"/></provision>" uuid=<vm-uuid>

g) Set memory parameters

root@dom0:~# xe vm-param-set memory-static-max=1024000000 uuid=<vm-uuid>
root@dom0:~# xe vm-param-set memory-dynamic-max=1024000000 uuid=<vm-uuid>
root@dom0:~# xe vm-param-set memory-dynamic-min=512000000 uuid=<vm-uuid>
root@dom0:~# xe vm-param-set memory-static-min=512000000 uuid=<vm-uuid>

h) Start VM

root@dom0:~# xe vm-start uuid=<vm-uuid>

i) Access console and continue installation

root@dom0:~# xe vm-list

It it shows vm in running state then we can access console of VM and continue Ubuntu raring installation


Get domain-id from

root@dom0:/# xe vm-param-list uuid=<vm-uuid> | grep dom-id

Then continue with OS installation.

j) If VM does not starts –

If VM does not get starts due to timeout issues then create local http server on one node and perform following operations:

root@dom0:/# mkdir -p /var/www/html/ubuntu

root@dom0:/# wget -r http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-amd64/current/images/netboot/

Downloaded directory structure has dists folder, copy it into /var/www/html/ubuntu/

So that it will form URL like this-

And then set

xe vm-param-set other-config:install-repository= uuid=<vm-uuid>

and repeat steps explained above.

During ubuntu installtion put http proxy to


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s