Xen 3.0.x on Debian Sarge
Guide to deploying Xen 3.0.x on Debian Sarge
Last updated: 2006-Jul-25 (Rev D)
This guide explains how to compile, install and setup Xen 3.0.x on Debian Sarge (a.k.a. stable). Feel free to add or clarify any sections if you have the knowledge.
Any questions can be directed to Mark Foster 
Prepare the base system by installing Debian Sarge and a few packages. I prefer using the debian-installer CD to get Sarge up and running.
You may need to manually edit the apt sources.list in the installer to point to stable (sarge) sources, instead of testing (sid). This is because rc3 came out prior to sarge becoming stable.
aptitude install iproute iproute-dev bridge-utils twisted aptitude install libcurl3 libcurl3-dev bzip2 ncurses-dev aptitude install make python python2.3-dev patch aptitude install gcc
Download Xen the source code from XenSource
If you are upgrading on top of a Xen 2.0.x installation, move or rename the /etc/xen/scripts folder, lest your networking not work after the upgrade.
mv /etc/xen/scripts /etc/xen/scripts.old
Untar, compile and install.
tar xzvf xen-3.0.2-2-src.tgz cd xen-3.0.2-2/ make world make install
Alternatively, if your box has 4GB or more RAM, you will want to enable PAE so the Xen kernel can see the extra memory. The last two steps from above would be.
make XEN_TARGET_X86_PAE=y world make XEN_TARGET_X86_PAE=y install
If you encounter any problems in the steps above, double-check that your pre-requisite packages got installed correctly! Read the Xen user documentation and FAQ. Check the logs at /var/log/xend.log and /var/log/xend-debug.log Only after doing the proper amount of research should you utilitize the xen-users email list for help.
Now we need to add the xen0 kernel to the grub menu. This will vary depending on your setup. For instance, you will want the
root= line to reference your / partition. I add the nousb kernel option to skip loading of USB code which has reportedly caused some problems on Dell PowerEdge hardware.
Here is an example of the xen kernel entry in
title Xen 3.0 / XenLinux 2.6.12 root (hd0,1) kernel /xen.gz dom0_mem=128000 noreboot console=tty0 module /vmlinuz-2.6.12-xen0 root=/dev/sda1 nousb ### BEGIN AUTOMAGIC KERNELS LIST
Note the last line in the section above. It is better to put your Xen grub entry above this line, so that your default kernel will not fluctuate if you happen to pick up any new kernel images using apt-get. (There is no need to run grub-install after editing menu.lst because grub reads the file from the filesystem.)
The xen developer team recommendeds we move the native TLS libraries on the Dom0 system out of the way as they are a real drag on performance.
mv /lib/tls /lib/tls.disabled
Now go ahead and reboot. Choose the Xen kernel when the system comes back up.
Once you have rebooted into the Xen kernel, start the xen daemon.
Next, see Debian Sarge on Xen, Centos-3 on Xen or Centos-4 on Xen to setup some virtual machines (aka DomUs). or setup your own. You can choose from just about any flavor of Linux, and soon FreeBSD, Win2K3/XP etc.