Installing Ubuntu 12.04 LTS on a XenServer VM

The following steps can be taken to install Ubuntu 12.04 LTS on a VM running on XenServer 6.

Unfortunately there is no standard template for Ubuntu 12.04 (at least in XenServer 6.0.2 which I used for testing), so we need to make a clone of the “Ubuntu Lucid Lynx 10.04” template and set another value for the distribution. First log into the console of the XenServer host and perform the following command:

xe template-list | grep -B1 "Ubuntu Lucid Lynx 10.04 (64-bit)"

This will show you (among other things) the UUID of the template we need to clone. Use this UUID in the following command:

xe vm-clone uuid=UUID_OF_LUCID_LYNX_TEMPLATE new-name-label="Ubuntu Precise Pangolin 12.04 (64-bit)"

The output will be yet another UUID, that of the newly created template for Ubuntu 12.04. Use this UUID in the following command:

xe template-param-set other-config:default_template=true other-config:debian-release=precise uuid=UUID_OF_PRECISE_PANGOLIN_TEMPLATE

Now go back to XenCenter and create a VM based on the new template:


Select the Ubuntu Precise Pangolin template and use the Ubuntu Archive URL “” in the following screen:


When you boot the newly created VM, the Ubuntu installer starts off. Do as you normally do to finish the installer.

When you boot into the freshly installed VM, it will sometimes (or often) happen that the filesystem is mounted read-only. I found an article that explains how to fix this. You just need to append the option “barrier=0” to the mount options of the root filesystem in /etc/fstab. Mine now looks like this:

UUID=95ce7b93-18c7-4f64-9788-510d3bc909cb / ext4 errors=remount-ro,barrier=0 0 1

Finally we add the guest tools. In XenCenter, attach xs-tools.iso to the DVD drive of the VM. Then mount xs-tools.iso, install the correct XenServer Tools package (replace amd64 with i386 if necessary) and unmount xs-tools.iso:

sudo mount /dev/cdrom /mnt
sudo dpkg -i /mnt/Linux/xe-guest-utilities_6.0.2-756_amd64.deb
sudo umount /mnt

In XenCenter, detach xs-tools.iso from the DVD drive of the VM and reboot the VM.

One thought on “Installing Ubuntu 12.04 LTS on a XenServer VM

  1. Permalink  ⋅ Reply


    June 25, 2015 at 6:37am

    Thank you so much, saved me a lot of time!!

Leave a Reply

Your email will not be published. Name and Email fields are required.