So here's a rough outline:
Install or having a working Ubuntu 10.04. If you are doing a fresh install, I recommend using ext3 on your hard disks otherwise you'll have to reconfigure the Xen-Linux kernel.
If you are using 32-bit install libc6-xen (This will get rid of the annoying TLS segmentation message): apt-get install libc6-xen
If you are using 64-bit install 32-bit utils: apt-get install gcc-multilibDownload Xen, either get the Xen 4.0.1 source or get testing. If you want the 4.0.1 source, its faster to download the tar.gz than the entire mecurial repository!
4.0.1 source: wget http://bits.xensource.com/oss-xen/release/4.0.1/xen-4.0.1.tar.gz
Testing source: hg clone http://xenbits.xen.org/xen-4.0-testing.hgBuild Xen, this includes building all tools but not the Xen-Linux Kernel:
cd into the Xen dir
make xen
make tools
make stubdom
make install-xen
make install-tools PYTHON_PREFIX_ARG=
make install-stubdom
Build the Xen-Linux Kernel (if you need to configure the kernel see the bottom of this post):
Optionally configure the kernel especially if you are using ext4 (see below)
make kernels
make install-kernels
Figure out kernel version by looking at the .config file in the kernel build path (typically starts with: build-linux-2.6-pvops_), so typing "head build-linux-2.6-pvops_x86_32/.config" in 32-bit case will print out the "Linux kernel version" near the top (the current version is 2.6.32.26)
update-initramfs -c -k [kernel version]
Making Xend auto-start:
update-rc.d xend defaults 20 21
Update Grub
Place this in /etc/grub/40_custom:
menuentry "Xen-Testing - Linux 2.6.32.26" {Note: you can obtain your disks partition (hd0,1) by running blkid on the device, the default device will usually be /dev/sda1 (e.g., blkid /dev/sda1). Also feel free to adjust dom0_mem
insmod ext2
set root="(hd0,1)"
multiboot /boot/xen.gz dom0_mem=256M
module /boot/vmlinuz-2.6.32.26 ro nomodeset root=UUID=24aece87-9b12-4966-8c04-4bd59d5808ae
module /boot/initrd.img-2.6.32.26
}
Finally update grub:
update-grubReboot into Xen. While testing you should leave the default boot into your regular kernel. Hold shift during reboot to access a grub menu and select Xen. Determine which grub entry Xen, hint, they are incremented in order from 0 to N. In my case, it was 6, so edit the /etc/default/grub and replace 0 with 6 on the line "GRUB_DEFAULT". The next step is to create a domU!