While many different Linux distributions include packages for Xen, this page focuses on CentOS and Redhat Enterprise Linux, which we have found to be well supported and easy to setup. To make full use of Xen, you should be running one of these distributions on a machine with plenty of RAM (8 GB or more), enough disk space for all the filesystems of instances you want to host, and a CPU that supports either Intel's VTI extensions or AMD Pacifica. Also, the host system should have LVM setup and have plenty of free space in its volume group, so that Cloudmin can create VM disk images as logical volumes.
This documentation relates to the open source version of Xen only - the commercial variant supported by Citrix is treated separately by Cloudmin, and is covered on the Citrix Xen page.
The Cloudmin GPL install script should install a Xen-capable kernel and all other required packages on the system it is run on, so none of the steps here are needed. All you need to do is reboot the system after running the installer, and then verify that the kernel includes Xen support by running
uname -r .
Cloudmin versions 8.3 and above will offer to automatically setup a Debian, Ubuntu, CentOS or Redhat system as a Xen host when you attempt to add it on the Xen Host Systems page. This includes installing the kernel and Xen tools, and creating a bridge if necessary. Only if this fails should you follow the manual installation steps below.
Once you have a freshly installed system running CentOS 5 and above, the steps to set it up for Xen hosting are :
rootvia SSH or at the console.
On CentOS 6 and above, an additional YUM repository needs to be enabled to install the Xen kernel packages, as they are not included with CentOS 6 by default. To do this, run the command
yum install https://au1.mirror.crc.id.au/repo/kernel-xen-release-6-5.noarch.rpm
Install the Xen kernel with the command
yum install kernel-xen kernel-xen-devel
Once the new kernel has been installed, an entry for it will be automatically added to
title CentOS (2.6.18-8.1.4.el5xen) root (hd0,2) kernel /xen.gz-2.6.18-8.1.4.el5 module /vmlinuz-2.6.18-8.1.4.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet module /initrd-2.6.18-8.1.4.el5xen.img
/boot/grub/menu.lstand change the
default=line to use the newly added Xen kernel, which will typically be the first one in the file (numbered 0).
Install the Xen commands package with the command
yum install xen parted
Disable the virbr0 Qemu network interface with the command
cat /dev/null >/etc/libvirt/qemu/networks/default.xml
Make sure SElinux is disabled by editing /etc/sysconfig/selinux and changing the SELINUX line to SELINUX=disabled .
Increase the limit on loopback devices by editing /etc/modprobe.conf and adding the line options loop max_loop=255 at the end .
Reboot the system with the
rebootcommand. If you are at the console, you should be able to see Xen-related messages during the kernel boot process.
Verify that Xen is working with the command :
If you see a line starting with
Domain-0, then all is good.
/xendirectory, which Cloudmin uses by default for Xen system images, with the command
And that's it! You can now register this system as a Xen host in Cloudmin.