Linux Tutorials
Building Hadoop Clusters On Linux In EC2
Installing And Using Hadoop
Setting Up SSH Keys Using SSH Agents And Tunnels
Creating OpenSSL Certificates and Certificate Authorities
Installing and configuring Xen
IPTables Primer
Linux Basic Bash Scripting

Installing and configuring Xen


Xen is an x86 Virtual Machine Monitor that allows one physical computer to run multiple virtual machines running different independent operating systems. This can create cost savings through fully utilizing todays powerful hardware by hosting multiple virtual hosts on one physical computer.

Installing Xen

First we need to download the source to Xen. For this tutorial we're going to use Xen 4.3.1. Xen source code is available from Now that we have the source downloaded we need to expand the archive and change into the directory.

$ tar -zxvf xen-3.3.1-src.tgz
$ cd xen-3.3.1-src

Now we need to do the initial compile and install. We run make world to handle the downloading and patching of the kernel source along with the first compile. After make world we go to make install and make install should be executed as root.

$ make world
# make install

If you wish to customize your Xen Linux kernel this is where you do it. When using make linux-2.6-xen-config CONFIGMODE you can also use xconfig or oldconfig to rebuild the configuration file for the kernel. Running make linux-2.6-xen-build will recompile the kernel with your new kernel options, and executing make xen-2.6-xen-install as root will install your new kernel.

$ make linux-2.6-xen-config CONFIGMODE=menuconfig
$ make linux-2.6-xen-build
$ make linux-2.6-xen-install

Compiling Separate dom0 & domU kernels

This allows for smaller guest domain kernels and shorter compile times when compiling guest kernels. As before 'make linux-2.6-xen-install' needs to be run as root.

$ make linux-2.6-xen-build KERNELS="linux-2.6-xen0 linux-2.6-xenU"
# make linux-2.6-xen-install

Updating GRUB

To boot your new Xen kernel you need to update your grub boot loader. Sorry lilo users lilo isn't compatible with Xen. Updating grub is as simple as editing /boot/grub/menu.lst. The lines below are an example entry for booting Xen via grub.

title Linux 2.6.18-xen / Xen 3.1.0 on (/dev/hda1)
kernel /boot/xen-3.3.1.gz noreboot
module /boot/vmlinuz- root=/dev/hda1 ro vga=normal

 1 2 3  >> Configuring the Xen dom0
New Content

Related Information
Linux Basic Bash Scripting