ubuntu10.04,编译xen 4.01

来源:互联网 发布:y4wq 3网络模块卡线刀 编辑:程序博客网 时间:2024/06/06 13:18

1.下载xen4.01的源码

2.安装必须的软件包(请参考http://wiki.xensource.com/xenwiki/Xen4.0)

apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 
module-init-tools transfig tgif texinfo texlive-latex-base texlive-latex-recommended
 texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial build-essential
make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev
 patch libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev e2fslibs-dev git-core
 uuid-dev ocaml libx11-dev
3.编译安装
make world && make install
4.添加到启动项
由于Grub2支持的xen不是太好用,所以将grub2替换为grub
#sudo apt-get install grub
#sudo rm /boot/grub/*
#sudo grub-mkdevicemap
#sudo grub-install /dev/sda
#sudo update-grub
这样自动就会添加xen的启动项了
如下:
title Xen 4.0.1 / Ubuntu 10.04.1 LTS, kernel 2.6.32.18
uuid fb1945ae-832e-4d4a-b9d7-78abb04e6a05
kernel /boot/xen-4.0.1.gz
module /boot/vmlinuz-2.6.32.18 root=UUID=fb1945ae-832e-4d4a-b9d7-78abb04e6a05 ro console=tty0
module /boot/initrd.img-2.6.32.18
quiet

5.重启,进入dom0
xend start
出现错误:
ImportError: No module named xen.xend.server
这是因为python 路径问题
解决方法:
在安装tools时添加选项,如下:
make install-tools PYTHON_PREFIX_ARG=
再次运行
xend start
出现如下错误:
xen.lowlevel.xc.Error: (1, 'Internal error', 'Could not obtain handle on privileged command interface (2 = No such file or directory)')
没有关系,换个方式运行:
/etc/init.d/xend start
然后就可以运行
#sudo xm list

 

原创粉丝点击