XenEnterprise, Ubuntu and OVA

I spent much of yesterday trying to get a XGT for Ubuntu Feisty working. What a PITA!

The main issues was that the XGT kernel defaults to with XE 3.4 while the template is being built. Furthermore the templating systems functions by building a diskmount, and then untarring the files on to this. It doesn’t use grub and the resultant images are like old style Xen, where the guest domain kernel is loaded from the host. Usually workable, and to date the Dapper template I build has been fine. But for some reason the Feisty template could not setting the root filesystem correctly and keep using reiserfs; not very nice! Working out how the (temporary, says Xensource) XGT system works, wasn’t really something I looked forward too.

Thinking about it this morning I figured it was better to have my cake and eat it too!

While I had been building the Feisty template, I discovered after apt-getting libc6-xen and xen-image-2.6.19-4-server, and changing boot/grub/menu.lst appropriately that XenEnterprise would boot the Ubuntu image correctly into PV mode. The second bit of the receipe was remembering the OVA system.

So I re-created another default Feisty install, using the Windows 2003 HVM template method. Adjusted the system by install the xen base kernel image, fixed some details I like to arrange on my default installs; then ended up spending half an hour creating a firehol 1.256 deb as the version in Feisty (and Debian) was broken.

The first step was to export the Feisty template domain to a OVA directory:

xe vm-export -h localhost  -u root -pw ${password} vm-name=uft dir-name=uft/


[root@node1 iso_import]# ls -lR uft/
total 8
drwxr-xr-x  2 root root 4096 Aug 10 11:52 hda
-rw-r--r--  1 root root 1182 Aug 10 11:55 ova.xml

total 394352
-rw-r--r--  1 root root 102704970 Aug 10 11:50 chunk-000000000.gz
-rw-r--r--  1 root root  25568969 Aug 10 11:50 chunk-000000001.gz
-rw-r--r--  1 root root  75610890 Aug 10 11:51 chunk-000000002.gz
-rw-r--r--  1 root root 117392411 Aug 10 11:52 chunk-000000003.gz
-rw-r--r--  1 root root  82104108 Aug 10 11:53 chunk-000000004.gz

After some minor description edits the ova.xml a simple import did the charm:

xe vm-import -h localhost  -u root -pw ${password} dir-name=uft/

And just like that I had a working clone of the original template image. When you are building your template there a few issues to watch out for, the main being iftab. You also want to regenerate any ssh host keys if you’ve installed sshd into your template. Plus watch out for editing /etc/hosts and breaking sudo, this can be a real PITA in Ubuntu as there is no usually seperate root password.

There are a few other resources to follow up later as well. Part of the puzzle is now putting together a generic deployment system for Ubuntu that edits details in the OVA before it is imported. Also, find out if this is a mechanism to setup the right network interfaces and additional disks from a command line import.

Finally, the primary issue with this method is that XenEnterprise does not allow you to do this via the UI. So it must be done via the command line. Maybe this is something worth chasing up with them in due course, once I’ve had a chance to see how XE4 works.


  1. John Said,

    August 10, 2007 @ 3:41 pm

    I have xgt for fiesty . Email me

  2. Samuel Said,

    January 25, 2008 @ 11:22 pm

    hi, i was wondering if you could send me the xgt for feisty to my email: samuel@cediant.es. Thank you.

  3. prashant Said,

    June 25, 2009 @ 2:57 am

    Hi, i am looking for a fiesty xgt, it is possible to send me a link to download it please.

    Many thanks

RSS feed for comments on this post