Today was the first time I had to create a new DomU after upgrading my Xen setup to Debian Lenny. When I booted the VM and logged in via xm console I got some strange errors when installing packages:
Can not write log, openpty() failed (/dev/pts not mounted?)
Additionally, after setting up SSH, I got the following error when logging in with SSH:
Server refused to allocate pty
Solution: install udev, reboot the VM and you’re good to go.
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
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/