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.
Cloudmin GPL
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
.
Automatic installation
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.
Manual installation on CentOS 5 and above
Once you have a freshly installed system running CentOS 5 and above, the steps to set it up for Xen hosting are :
-
Login as
root
via 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 http://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
/boot/grub/menu.lst
like :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
-
Edit
/boot/grub/menu.lst
and change thedefault=
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
reboot
command. 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 :
xm list
If you see a line starting with
Domain-0
, then all is good. -
Create the
/xen
directory, which Cloudmin uses by default for Xen system images, with the commandmkdir /xen
And that's it! You can now register this system as a Xen host in Cloudmin.
Manual installation on Redhat Enterprise 5 and above
If your RHEL 5 system has the yum
command installed and working, you can follow the exact same steps above. If not, use Redhat's up2date
command instead :
-
Login as
root
via SSH or at the console. -
Make sure all packages are up to date and your Redhat Enterprise subscription is working by running the command :
up2date -u
-
Install the Xen kernel with the command
up2date kernel-xen kernel-xen-devel
-
Once the new kernel has been installed, an entry for it will be automatically added to
/boot/grub/menu.lst
like :title Redhat Enterprise (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
-
Edit
/boot/grub/menu.lst
and change thedefault=
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
up2date xen
-
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
reboot
command. 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 :
xm list
If you see a line starting with
Domain-0
, then all is good. -
Create the
/xen
directory, which Cloudmin uses by default for Xen system images, with the commandmkdir /xen
Manual installation on Ubuntu Linux 8.04
-
Login as
root
via SSH or at the console. -
Update your package database with the command :
apt-get update
-
Install the Xen capable kernel and support packages with the command :
apt-get install ubuntu-xen-server libc6-xen xen-tools xen-utils-3.2 xen-hypervisor-3.2 parted
-
Edit
/boot/grub/menu.lst
and change thedefault=
line to use the newly added Xen kernel, which will typically be the first one in the file (numbered 0). -
Increase the limit on loopback devices by editing /etc/modules and adding the line loop max_loop=255 at the end .
-
Reboot the system with the
reboot
command. 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 :
xm list
If you see a line starting with
Domain-0
, then all is good. -
Create the
/xen
directory, which Cloudmin uses by default for Xen system images, with the commandmkdir /xen
Manual installation on Debian Linux 4.0 / 5.0
-
Login as
root
via SSH or at the console. -
Update your package database with the command :
apt-get update
-
Install the Xen capable kernel and support packages with the command :
apt-get install xen-linux-system libc6-xen xen-tools xen-utils-3.2-1 xen-hypervisor-3.2-1-i386 parted
On a 64-bit system, replace the xen-hypervisor-3.2-1-i386 package above with xen-hypervisor-3.2-1-amd64.
-
Edit
/boot/grub/menu.lst
and change thedefault=
line to use the newly added Xen kernel, which will typically be the first one in the file (numbered 0). -
Increase the limit on loopback devices by editing /etc/modules and adding the line loop max_loop=255 at the end .
-
Reboot the system with the
reboot
command. 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 :
xm list
If you see a line starting with
Domain-0
, then all is good. -
Create the
/xen
directory, which Cloudmin uses by default for Xen system images, with the commandmkdir /xen
Debian Linux6.0
-
Login as
root
via SSH or at the console. -
Update your package database with the command :
apt-get update
-
Install the Xen capable kernel and support packages with the command :
apt-get install xen-linux-system parted
-
Activate the Xen-capable kernel as documented on http://wiki.debian.org/Xen . The quickest command to do this is
mv -i /etc/grub.d/10_linux /etc/grub.d/21_linux ; upgrade-grub
-
Enable the Xen network bridge by editing
/etc/xen/xend-config.sxp
and un-commenting the line(network-script network-bridge)
-
Reboot the system with the
reboot
command. 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 :
xm list
If you see a line starting with
Domain-0
, then all is good. -
Create the
/xen
directory, which Cloudmin uses by default for Xen system images, with the commandmkdir /xen
Comments
Submitted by christefano on Fri, 07/03/2009 - 07:30 Pro Licensee Permalink
When will there be documentation here for Debian- and Ubuntu-based systems?
Soon. Jamie has setup the apt repos, and is populating them now. The build stuff for Cloudmin will probably move over to me now that we're launched (while in beta, Jamie was rolling releases very frequently; and we were pretty specific about target platforms to reduce variables).
There will also be a version of the install script for Debian and Ubuntu.
Submitted by sgrayban on Tue, 04/20/2010 - 17:31 Permalink
Still no docs for debian/utbuntu