Install Xen4.1.1 through source code compilation in CentOS

Source: Internet
Author: User
This article is intended for users who want to install the Xen virtualization environment in CentOS. Read this article carefully before using it. If you are not familiar with Linux terminal operations, please move on. Step 1 install the required software package: first, minimize the installation of CentOS. First, use yum to upgrade the system # yumupdate and then install and compile Xen and Linuxxenkernel.

This article describes how to install Xen in CentOS.VirtualizationEnvironment friends. Read this article carefully before using it. If you are not familiar with Linux terminal operations, please move on.

Step 1 install the required software package:

First, minimize CentOS installation. First, use yum to upgrade the system.

# Yum upDate

Install the required software packages for compiling Xen and Linux xen kernel:

# Yum groupinstall "Development Too Ls"# Yum install hmaccalc NcUrses-devel zlib-devel openssl-devel python-devel \ br IdGe-utils libtool-ltdl iasl xorg-x11-drv-evdev xorg-x11-drv-fbdev \ xorg-x11-drv-i810-devel xorg-x11-drv-via-devel xorg-x11-proto-devel \ xorg-x11-server-sdk xorg-x11-x TrAns-devel to http://www.a CpIca.org/downloadsdownload and install acpica. CompressionIn the compiler directory of the package, # make install   Step 2 install Xen hypervisor:To http://www.xen.org/pro DuCts/xen_source.html download the latest Xen source code, and then unlock, compile, install, the standard Linux software source code installation action: # tar zxvf xen-4.1.1.tar.gz # CdXen-4.1.1/# make world (this process takes about 10-15 minutes) # make install Step 3 add Xen to the startup script:#/Sbin/ Chkconfig-- DdXend #/sbin/chkconfig -- add xendomains #/sbin/chkconfig -- add xencommons #/sbin/chkconfig xend on #/sbin/chkconfig xendomains on #/sbin/chkconfig xencommons on Step 4 download, configure, and compile the Xen kernel:

Download the Linux kernel and patch the kernel with xen:

$ Cd $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.8.tar.bz2 $ tar-xjf linux-2.6.31.8.tar.bz2 $ wget http://gentoo-xen-kernel.googlecode.com/ FileS/xen- PatchEs-2.6.31-10.tar.bz2 $ MkdirXenpatch-2.6.31.8 $ cd xenpatch-2.6.31.8 $ tar-xjf ../xen-patches-2.6.31-10.tar.bz2 $ cd .. $ cd linux-2.6.31.8 $ for I in 'ls ../xenpatch-2.6.31.8 /';\
Do patch-p1 <../xenpatch-2.6.31.8/"$ I"; done

Configure the Linux kernel www.linuxidc.com with xen:

$ Make menuconfig

Processor type and features --->
[*] Enable Xen compatible kernel
NetworkingSuPport --->
Networking options --->
<*> 802.1d Ethernet Bridging
Device Drivers --->
XEN --->
[*] PrivilegEdGuest (domain 0)
<*> Backend driver support
<*> Block-device backend driver
<*> Block-device tap backend driver
<*> Block-device tap backend driver 2
<*> Network-device backend driver
<*> PCI-device backend driver
<*> SCSI backend driver
<*> USB backend driver
<*> Block-device frontend driver
<*> Network-device frontend driver
<*> SCSI frontend driver
<*> USB frontend driver
<*> Framebuffer-device frontend driver
<*> Keyboard-device frontend driver
[*] Disable serial port drivers
<*> Export Xen attributes in sysfs
Xen version compatibility (3.3.0 and later) --->
3.3.0 and later
Note: If a 32-bit system is used, you must enable the PAE function and select 64 GB for the memory. Otherwise, the kernel will report an error after the system is restarted.
Processor type and features --->
High Memory Support (4 GB) --->
64 GB

After kernel parameters are configured, save and exit and start compiling the Linux kernel:
# Make
(This process takes about 30-45 minutes)
# Make modules
# Make modules_install
# Make install
#/Sbin/Depmod2.6.31.8

Step.5 update grub boot information:

# Vi/boot/grub/menu. lsttitle CentOS (2.6.31.8-xen) root (hd0, 0) kernel/xen-4.1.1.gz module/vmlinuz-2.6.31.8 ro root =/dev/VolGroup00/LogVol00 module/initrd-2.6.31.8.img

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.