KVM is nice and all, but not all servers I'd like to run virtual guests on have virtualization capable processors. Also, Xen makes it simple to set up guests without any sort of requirement for a GUI. These are instructions for setting up an Ubuntu server as a Xen host.
manually partition: 20 GB root, the rest as LVM but leave 1-2 GB swap at the end
rm /etc/motd touch /etc/motd
/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
apt-get update apt-get dist-upgrade apt-get install vim
loop max_loop=64
apt-get install ubuntu-xen-server lvm2 init 6
XENDOMAINS_SAVE=""
pvcreate /dev/sda2 vgcreate vg /dev/sda2
mount -o loop /path/to/hardy.iso /mnt rsync -av /mnt/ /hardy_media
lvm = vg install-method = debootstrap size = 10Gb # Disk image size. memory = 512Mb # Memory size swap = 256Mb # Swap size dist = hardy # Default distribution to install. image = full # Specify sparse vs. full disk images. gateway = 192.168.1.1 netmask = 255.255.255.0 broadcast = 192.168.1.255 cache = no passwd = 1 arch=amd64 mirror_hardy = file:///hardy_media ext3_options = relatime,errors=remount-ro ext2_options = relatime,errors=remount-ro boot = 1
It's important to now go to /usr/lib/xen-tools and make sure you understand everything happening in hardy.d (create them if they don't exist using another as an example). It seems to duplicate some Ubuntu things and may do unnessary things for your environment. I prefer to gut it and build up.
01-disable-daemons 31-ubuntu-setup 40-setup-networking 50-setup-hostname 80-install-modules 90-make-fstab 99-enable-daemons
You might want to modify 20-setup-apt to update and get some default packages installed.
Also check /usr/share/debootstrap/scripts, no modification should be necessary except perhaps to create a symlink for jaunty:
ln -s gutsy /usr/share/debootstrap/scripts/jaunty
Once you're done, move on to creating a Xen guest!