中文版本的可以参考 http://blog.youkuaiyun.com/gold2008/article/details/8593975
Support - Xen Installation Guide
RedHat Enterprise Linux 6
CentOS 6
Scientific Linux 6
As any user of an EL6 distro would know, the creator of EL6 packages is RedHat (lovingly called TUV or The Upstream Vendor). Sadly, Redhat dropped support for Xen in version 6 of RedHat Enterprise Linux - preferring KVM as their corporate solution. Personally, I don't think this was the correct decision. This mini-howto will give the basics of setting up the Xen Dom0 using packages maintained by Steven Haigh, the main author of this site. From there, any Xen tutorial will cover the basics (and some more advanced) functionality of Xen guests (both Windows and Linux).
More support for these packages can be found in the support section of this site.
Step 1
Download and install your base OS. I personally use Scientific Linux 6. After downloading and burning the DVD, perform a minimal install adding packages you require.
Step 2
Install the bridge-utils package.
# yum install bridge-utils
Step 3
Enable my Xen Repo for x86_64:
# yum install http://au1.mirror.crc.id.au/repo/el6/x86_64/kernel-xen-release-6-5.noarch.rpm
Step 4
Install the Xen hypervisor and Dom0 Kernel:
# yum install kernel-xen xen
Step 5
Modify your /etc/grub.conf to firstly load the Xen hypervisor, then boot your OS. A correctly modified grub.conf should look something like the following. The important parts are in bold.
title Scientific Linux (3.8.3-1.el6xen.x86_64)
root (hd0,0)
kernel /xen.gz dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin
module /vmlinuz-3.8.3-1.el6xen.x86_64 ro root=/dev/mapper/RAID1-xenhost rd_LVM_LV=RAID1/xenhost rd_MD_UUID=afb92c19:b9b1e3ae:07af315d:738e38be rd_NO_LUKS rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us quiet panic=5
module /initramfs-3.8.3-1.el6xen.x86_64.img
Step 6
Disable SELinux. While selinux is a great idea, it really screws with Xen. If there is anyone out there who wants to wade through what should be set for selinux to be enabled and still have Xen working, please email me! In the mean time, disable it by editing the following file /etc/sysconfig/selinux.
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Step 7
Reboot into your new Xen kernel and test:
#xm info
Step 8 (Optional)
If you wish to have a graphical installer for guest operating systems, you can install libvirt. After a reboot, simply install it via the yum package manager.
# yum install libvirt