这次编译用的xen的内核是 linux-2.6.18-xen,这个内核目前能支持xen4.0的所有功能。不同的xen内核所支持的功能可以这里查看。下面是编译方法。
- 安装一些开发包
- yum -y groupinstall "Development Libraries"
- yum -y groupinstall "Development Tools"
- yum -y install transfig wget texi2html libaio-devel dev86 e2fsprogs-devel gitk mk
- initrd iasl xz-devel bzip2-devel pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial glibc-devel
2.获取xen源码
- yum -y install mercurial git
- hg clone http://xenbits.xen.org/xen-4.0-testing.hg
3.编译安装xen
- cd xen-4.0-testing.hg
- make -j16 xen && make -j16 tools && make -j16 stubdom
- make install-xen
- make install-tools PYTHON_PREFIX_ARG=
4.编译安装xen kernel linux-2.6.18
- make install-tools PYTHON_PREFIX_ARG=
- cd build-*
- make -j16 && make -j16 modules&& make -j16 modules_install
- make install
5.更新启动项
- title Xen 4.0
- root (hd0,1)
- kernel /xen-4.0.gz
- module /vmlinuz-2.6.18.8-xen root=LABEL=/ rhgb
- module /initrd-2.6.18.8-xen.img
- 注:root=X,X根据实际情况,跟系统其它启动项中的参数一样
6.重启系统
转载于:https://blog.51cto.com/inaction/586765