哈哈镜中缘 2011-08-30
直入主题,本文写给希望在CentOS系统中安装Xen虚拟化环境的朋友。请使用前仔细阅读本文,如果您尚不熟悉Linux终端操作,请移步。
Step.1 安装需要的软件包:
首先最小化安装 CentOS,首先使用yum升级系统
# yum update
然后安装编译 Xen 和 Linux xen kernel 所需要的软件包:
下载 Linux 内核后给内核打 xen 补丁:
$ make menuconfig
Processor type and features --->
[*] Enable Xen compatible kernel
Networking support --->
Networking options --->
<*> 802.1d Ethernet Bridging
Device Drivers --->
XEN --->
[*] Privileged Guest (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
注意:如果使用32位系统,则务必将PAE功能开启,将内存支持选择为64GB,否则会重启后内核将会报错。
Processor type and features --->
High Memory Support (4GB) --->
64GB
配置好内核参数以后,保存并退出,开始编译 Linux 内核:
# make
(此过程耗时约30-45分钟)
# make modules
# make modules_install
# make install
# /sbin/depmod 2.6.31.8
Step.5 更新 grub 引导信息: