Lately, I wanted set up a Ubuntu Hardy DomU on an existing Debian Etch Dom0 box. Usually, setting up Debian-based DomUs is very simple with xen-create-image and debootstrap (there are tons of tutorials out there dealing with this topic), but unfortunately Etch’s version of debootstrap doesn’t support Ubuntu Hardy. I spent a surprisingly long time on searching the net until I found a solution for this problem on a french site: Installer et configurer Xen sur Debian 4.0 Etch (it’s a complete howto for Xen on Debian Etch, but it deals with the Hardy part too). The author created a backport of the debootstrap package, which enables you to debootstrap Hardy.
First, you have to create the hardy.d directory (symlink) for xen-tools.
$ cd /usr/lib/xen-tools $ ln -s ubuntu.d hardy.d
There’s a debian repository holding the backport package, however I got problems to use that repository on an amd64 box, so I downloaded and installed the package manually.
$ wget http://falcon.landure.fr/pool/etch/debootstrap/debootstrap_1.0.10_all.deb $ dpkg -i debootstrap_1.0.10_all.deb
Now you should be able to debootstrap a Hardy DomU.
$ xen-create-image \ --hostname=hardy \ --ip=xxx.xxx.xxx.xxx \ --size=5Gb \ --memory=256Mb \ --dist=hardy \ --mirror=http://archive.ubuntu.com/ubuntu/