前段时间由于一些特殊的需求,需要使用2.6.39版本的linux内核安装xen,遇到了一些问题,总结一下。
第一步下载内核,www.kernel.org,我当时用的是rc-3版本的内核。解压,OK。
第二步配置内核,进入解压后的内核目录,make menuconfig进入配置界面,具体配置参考
http://wiki.xensource.com/xenwiki/XenParavirtOps
第三步编译内核,修改grub,重启。
好了现在我们使用2.6.39内核启动了.
但此时无法启动xend,很费解。于是查log。
/var/log/xen/xend-debug.log:
cat: /sys/bus/scsi/devices/host0/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host0/model: No such file or directory
cat: /sys/bus/scsi/devices/host0/type: No such file or directory
cat: /sys/bus/scsi/devices/host0/rev: No such file or directory
cat: /sys/bus/scsi/devices/host0/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/host1/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host1/model: No such file or directory
cat: /sys/bus/scsi/devices/host1/type: No such file or directory
cat: /sys/bus/scsi/devices/host1/rev: No such file or directory
cat: /sys/bus/scsi/devices/host1/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/host2/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host2/model: No such file or directory
cat: /sys/bus/scsi/devices/host2/type: No such file or directory
cat: /sys/bus/scsi/devices/host2/rev: No such file or directory
cat: /sys/bus/scsi/devices/host2/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/host3/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host3/model: No such file or directory
cat: /sys/bus/scsi/devices/host3/type: No such file or directory
cat: /sys/bus/scsi/devices/host3/rev: No such file or directory
cat: /sys/bus/scsi/devices/host3/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/host4/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host4/model: No such file or directory
cat: /sys/bus/scsi/devices/host4/type: No such file or directory
cat: /sys/bus/scsi/devices/host4/rev: No such file or directory
cat: /sys/bus/scsi/devices/host4/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/host5/vendor: No such file or directory
cat: /sys/bus/scsi/devices/host5/model: No such file or directory
cat: /sys/bus/scsi/devices/host5/type: No such file or directory
cat: /sys/bus/scsi/devices/host5/rev: No such file or directory
cat: /sys/bus/scsi/devices/host5/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/target2:0:0/vendor: No such file or directory
cat: /sys/bus/scsi/devices/target2:0:0/model: No such file or directory
cat: /sys/bus/scsi/devices/target2:0:0/type: No such file or directory
cat: /sys/bus/scsi/devices/target2:0:0/rev: No such file or directory
cat: /sys/bus/scsi/devices/target2:0:0/scsi_level: No such file or directory
cat: /sys/bus/scsi/devices/target3:0:0/vendor: No such file or directory
cat: /sys/bus/scsi/devices/target3:0:0/model: No such file or directory
cat: /sys/bus/scsi/devices/target3:0:0/type: No such file or directory
cat: /sys/bus/scsi/devices/target3:0:0/rev: No such file or directory
cat: /sys/bus/scsi/devices/target3:0:0/scsi_level: No such file or directory
搜了一下,在启动xend之前需要先通过xencommons进行初始化。
/etc/init.d/xencommons start
于是又出错误:
Starting xenstored…FATAL:Failed to open evtchn device: No such file or directory
...........
Could not start xenstored.
竟然还要先手动加载evtchn模块
modprobe xen-evtchn
再运行xencommons,成功。
启动xend,成功。
P.S. 加载模块的这一步,不一定只有evtchn一个。例如要用grant table 的话,还需要加载xen-gntalloc。等等。
如果还是无法启动,请关闭selinux;
本文转自灬落魄灬 51CTO博客,原文链接:http://blog.51cto.com/smoke520/1834151,如需转载请自行联系原作者