1. Server environment and Xen version:
CentOS 5.4 64bit
Xen-3.4.3, already comes with the installation package
2. Homemade local Yum Source:
Install httpd, point to local Xen Yum source
3. Modify the Yum.repo to point to the local Yum Source:
[Base]
name=centos-$releasever-base
baseurl=http://127.0.0.1/centos/$releasever/os/$basearch/
gpgcheck=0
enabled=1
[Updates]
name=centos-$releasever-updates
baseurl=http://127.0.0.1/centos/$releasever/updates/$basearch/
gpgcheck=0
enabled=1
[gitco-xen3.4.3]
name=rhel/centos-$releasever-gitco XEN3.4.3
baseurl=http://127.0.0.1/xen3.4.3
gpgcheck=0
enabled=1
4. Generate the latest Yum cache:
Yum Clean All
Yum Makecache
5. Install Xen:
Yum Install Xen xen-devel xen-libs
Yum Install Kernel-xen kernel-xen-devel (Kernel-xen here must be installed, may have installed Kernel-xen in the previous step)
6. Modify Grub:
At this point in the/boot/directory you will find more files about El5xen , this is the image file with Xen.
The following need to modify the grub.conf file, using the El5xen kernel file (here it is possible to install Kernel-xen when the grub.conf file has been modified):
# grub.conf generated by Anaconda
#
# Note that you don't have the to rerun grub after making changes to the This file
# notice:you has a/boot partition. This means
# All kernel and INITRD paths is relative to/boot/, eg.
# root (hd0,0)
# kernel/vmlinuz-version ro root=/dev/sda2
# initrd/initrd-version.img
#boot =/DEV/SDA
Default=0 (This must be the title with the Xen kernel)
timeout=5
splashimage= (hd0,0)/grub/splash.xpm.gz
Hiddenmenu
Title CentOS (2.6.18-238.12.1.el5xen)
Root (hd0,0)
kernel/xen.gz-3.4.3
Module/vmlinuz-2.6.18-238.12.1.el5xen ro root=label=/
Module/initrd-2.6.18-238.12.1.el5xen.img
Title CentOS (2.6.18-164.EL5)
Root (hd0,0)
Kernel/vmlinuz-2.6.18-164.el5 ro root=label=/
Initrd/initrd-2.6.18-164.el5.img
7. Restart the server:
Restart the server and confirm that the kernel with Xen is already in use.
[Email protected] ~]# uname-a
Linux Localhost.localdomain 2.6.18-238.12.1. el5xen #1 SMP Tue may 14:02:29 EDT x86_64 x86_64 x86_64 gnu/linux
8. Xen Installation Complete:
[Email protected] ~]# XM Li
Name ID Mem Vcpus State time (s)
Domain-0 0 7955 8 R-----18.6
CentOS Installation Xen