xen-4.1.2+Linux-3.1.2源码编译安装

xen-4.1.2+Linux-3.1.2源码编译安装
 
以下所有命令均在CentOS6.2系统上操作。
 
下载xen源码 
wget http://bits.xensource.com/oss-xen/release/4.1.2/xen-4.1.2.tar.gz
 
安装必备软件包

yum groupinstall "Development Libraries"
yum groupinstall "Development Tools"
yum install transfig wget texi2html libaio-devel dev86 glibc-devel e2fsprogs-devel gitk mkinitrd iasl xz-devel bzip2-devel pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial libidn-devel
yum -y install glibc-devel.i686texinfo libuuid-devel iasl python-lxml
yum -y install openssl openssl-devel
yum -y install ncurses ncurses-*
yum install python-devel -y
 
编译安装xen hypervisor

tar zxvf xen-4.1.2.tar.gz
 
make world
make install
 
/boot下多了xen-4.1.2.gz和xen-syms-4.1.2文件
 
将Xen加入到启动脚本:
 
     
/sbin/chkconfig --add xend
/sbin/chkconfig --add xencommons
/sbin/chkconfig --add xendomains
/sbin/chkconfig xend on
/sbin/chkconfig xendomains on
/sbin/chkconfig xencommons on
 
      
 
编译安装Linux3.1.2内核

wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.1.2.tar.bz2
# make oldconfig # 全部默认
# make menuconfig 
 
Processor type and features --- >
     选中Paravirtualized Guest Support
  Device Drivers ---> 
      Xen driver support ---> 
        全部选*
 
修改:CONFIG_XEN_DEV_EVTCHN=y( 如果是m,开机时无法启动xencommons
 
make
make modules
make modules_install
make install (会报找不到xen-evtchn模块,忽略
depmod 3.1.2
mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod initramfs-3.1.2.img 3.1.2
 
配置grub
 
title CentOS (3.1.2-xen)
        root (hd0,0)
        kernel /boot/xen-4.1.2.gz  dom0_mem=1024M
        module /boot/vmlinuz-3.1.2 ro root=/dev/sda1
        module /boot/initramfs-3.1.2.img
 

你可能感兴趣的:(linux)