Install the Xen4CentOS Stack

The software released for this stack is hosted in its own self contained repository on the CentOS mirror network. In order to enable this repository, ensure that the CentOS-Extras repo is enabled and type:

yum install centos-release-xen

Once that is done, we can now install xen itself:

yum install xen

The Xen hypervisor runs above the linux kernel, and we need to tell grub to boot it first and then chain boot the linux kernel for our dom0. In order to do that, a script is provided as part of the centos-release-xen rpm, lets run that now:

/usr/bin/grub-bootxen.sh

At this point if you look at your /boot/grub/grub.conf it should have something like this:

title CentOS (3.4.46-8.el6.centos.alt.x86_64)
        root (hd0,0)
        kernel /xen.gz dom0_mem=1024M,max:1024M loglvl=all guest_loglvl=all
        module /vmlinuz-3.4.46-8.el6.centos.alt.x86_64 ro root=/dev/mapper/vg_xen01-lv_root rd_LVM_LV=vg_xen01/lv_swap rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk rd_NO_MD LANG=en_GB rd_LVM_LV=vg_xen01/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_DM rhgb quiet
        module /initramfs-3.4.46-8.el6.centos.alt.x86_64.img

and this should be set as your default boot kernel. Once you reboot, verify that the 3.4 kernel is running with:

uname -r

and verify that xen is running with:

xm info