Installing Xen On CentOS 5.2 (i386)
Installing Xen On CentOS 5.2 (i386)Version 1.0 This tutorial provides step-by-step instructions on how to install Xen (version 3.0.3) on a CentOS 5.2 system (i386). Xen lets you create guest operating systems (*nix operating systems like Linux and FreeBSD), so called "virtual machines" or domUs, under a host operating system (dom0). Using Xen you can separate your applications into different virtual machines that are totally independent from each other (e.g. a virtual machine for a mail server, a virtual machine for a high-traffic web site, another virtual machine that serves your customers' web sites, a virtual machine for DNS, etc.), but still use the same hardware. This saves money, and what is even more important, it's more secure. If the virtual machine of your DNS server gets hacked, it has no effect on your other virtual machines. Plus, you can move virtual machines from one Xen server to the next one. I will use CentOS 5.2 (i386) for both the host OS (dom0) and the guest OS (domU). This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web. This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI use the following partitions on my CentOS 5.2 host system (dom0):
I will create the virtual machines in the /vm directory; of course, you can use any other directory that has enough space left, and you don't have to create a partition of its own for it. If you use another directory, replace /vm with your own directory in this tutorial. If you want to save your virtual machines in /vm, too, but haven't created a partition for it of if the directory /vm doesn't exist on your system, you can create it like this: mkdir /vm Make sure that SELinux is disabled or permissive: vi /etc/sysconfig/selinux
If you had to modify /etc/sysconfig/selinux, please reboot the system: reboot
2 Installing XenTo install Xen, we simply run yum install kernel-xen xen This installs Xen and a Xen kernel on our CentOS system. Before we can boot the system with the Xen kernel, please check your GRUB bootloader configuration. We open /boot/grub/menu.lst: vi /boot/grub/menu.lst The first listed kernel should be the Xen kernel that you've just installed:
Change the value of default to 0 (so that the first kernel (the Xen kernel) will be booted by default):
The complete /boot/grub/menu.lst should look something like this:
Afterwards, we reboot the system: reboot The system should now automatically boot the new Xen kernel. After the system has booted, we can check that by running uname -r [root@server1 ~]# uname -r So it's really using the new Xen kernel! We can now run xm list to check if Xen has started. It should list Domain-0 (dom0): [root@server1 ~]# xm list
|




print: 
Recent comments
56 min 55 sec ago
6 hours 23 min ago
7 hours 25 min ago
8 hours 11 min ago
10 hours 17 min ago
10 hours 27 min ago
12 hours 57 min ago
13 hours 47 min ago
16 hours 23 min ago
16 hours 48 min ago