This works fine using CentOS 5.2 and 5.3, and Xen 3.3 or Xen 3.4
yum install yum-priorities
configure priorities and the rpmforge repo as described here:
perhaps epel would be more appropriate
yum install mercurial zlib-devel gcc libX11-devel openssl-devel ncurses-devel bridge-utils python-devel git dev86 glibc-devel makeinfo patch make
If you want the docs to build, you need to install the following:
yum install texinfo tetex-latex pstoedit transfig graphviz
though you can forgo this.
now, download the source from mercurial:
then within your local xen-3.3-testing.hg directory, run:
make -j 4 xen tools docs
make linux-2.6-xen-config configmode=MENUCONFIG
as usual, remove the useless crap. set your cpu arch. the usual when compiling a kernel. You probably want to leave serial (8250) disabled, as it conflicts with the xen serial console stuff (you really want to use the xen serial console stuff. trust me.) if you need serial ports that are not consoles, I recommend using USB serial dongles. I get 'em on ebay in 5 packs for about $3 each.
if you must have access to serial ports in the Dom0, see here for details:
also remember to include support for your favorite firewall. (you don't need IPv6 for the Dom0, really, but if the DomUs are using it, having support for a IPv6 firewall is probably a good idea.)
make linux-2.6-xen-build -j 4 make linux-2.6-xen-install make install
note, if you are compiling this for another system, you want to run
make linux-2.6-xen-build -j 4 make dist
then copy dist to your dest and run install.sh.
another note: Personally, I like to compile all drivers required for boot into the kernel, but it appears that the CentOS/RHEL mkinitrd scripts work even if you are using the xen.org kernel (and using a kernel.org/xen.org kernel on CentOS without a CentOS initrd is a huge pain. I'd not recommend it.) so because I'm doing the mkinitrd step anyhow (and I need the initrd to work) I"m compiling things 'the redhat way' so I'm leaving most things as modules.
mkinitrd /boot/initrd-22.214.171.124-xen.img 126.96.36.199-xen
(note, there is a bug in early RHEL 5.3 that causes problems with this. see https://bugzilla.redhat.com/show_bug.cgi?id=488991 the solution is to add --allow-missing)
(of course, if you need drivers you compiled as modules at boot time, you need to --preload them now.)
lock down ethernet:
On CentOS5 this means in /etc/sysconfig/network-scripts/ifcfg-eth0, you add
for every ethernet interface you don't want to jump around. Note: without this, changing from the CentOS kernel to the xen.org kernel will likely change the order of your nicks. This is done by default by the CentOS installer, though, so unless you install weirdly, you shouldn't need to worry about it.
Now, you need to fix /boot/grub/menu.lst.
title Xen.org 188.8.131.52-xen-3.3 root (hd0,0) kernel /boot/xen-3.3.gz module /boot/vmlinuz-184.108.40.206-xen ro root=/dev/md0 module /boot/initrd-220.127.116.11-xen.img
oh, also, if you get the following error when starting hvm domains:
[root@localhost xen]# xm create -c fbsd_hvm Using config file "./fbsd_hvm". Error: (1, 'Internal error', 'Could not open kernel image (2 = No such file or directory)')
that means you need to go back and install glibc-devel and dev86 and re-make your tools.