Posted by: kezhong | April 8, 2010

Install XEN Virtualization Software on CentOS 5.4

Enabling Intel® VT and AMD-V virtualization hardware extensions
If you want to install fully-virtualized guest such as Windows system later, you should enable virtualization hardware extensions. The below is the steps.
1.Reboot the computer and open the system’s BIOS menu.
2.Open the Processor section and enable Intel®Virtualization Technology or AMD-V. Select Save & Exit.
3.Power off the machine and disconnect the power supply.

Installing Xen Virtualization during a new CentOS 5.4 installation
When you operate to the Package selection during installation of CentOS 5.4, you select Virtualization and go on the other steps. After finishing, reboot the system. This way is pretty easy. If you hasn’t installed Virtualization package during installation of OS, you may install as below.

Installing Xen Virtualization on an existing CentOS 5.4 system
Install xen and kernel-xen packages
# yum install xen kernel-xen -y
If you want to use GUI to install Xen guest system later, you may install virt-manager package
# yum install virt-manager -y
After installation, modify the /boot/grub/grub.conf file, and change “default=1” to “default=0”
# vi /boot/grub/grub.conf
title CentOS (2.6.18-164.15.1.el5xen)
root (hd0,0)

kernel /boot/xen.gz-2.6.18-164.15.1.el5
module /boot/vmlinuz-2.6.18-164.15.1.el5xen ro root=LABEL=/ rhgb quiet
module /boot/initrd-2.6.18-164.15.1.el5xen.img
title CentOS (2.6.18-164.el5xen)
root (hd0,0)

kernel /boot/xen.gz-2.6.18-164.el5
module /boot/vmlinuz-2.6.18-164.el5xen ro root=LABEL=/ rhgb quiet
module /boot/initrd-2.6.18-164.el5xen.img

Then reboot the system
# reboot

After reboot, you can use xm command to do something.
# xm dmesg|grep VMX
(XEN) HVM: VMX enabled
(XEN) VMX: MSR intercept bitmap enabled
# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0    29550     8 r—–   15.8

Red Hat Enterprise Linux Virtualization Guide


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: