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
參考:
http://linuxme.blog.51cto.com/1850814/390778
http://share.blog.51cto.com/278008/723828
http://blog.chinaunix.net/space.php?uid=147142&do=blog&id=2788048
http://wiki.xen.org/xenwiki/2.6.18-to-2.6.31-and-higherhttp://wiki.xen.org/wiki/Migrate_from_Linux_2.6.18_to_2.6.31_and_higherhttp://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configshttp://wiki.xen.org/wiki/HostConfiguration/Networking