在 CentOS 下源码安装 Xen

在 CentOS 源码编译安装 Xen 的过程和在 Debian 上编译安装 Xen 的过程差不多,只是第一步安装编译所需要的工具和软件包有所不同,后续步骤有点小差别,不过方法都是一样的,这也说明各个 Linux 发行版之间的区别真的不大,没有必要为选择 Linux 发行版而发愁。编译一个 Xen 内核和编译一个普通 Linux 内核没有什么不同,如果发现编译后的内核启动不了,出现 kernel panic 的情况,多半是内核与机器的硬件没有配置好的原因,和 Xen 没有关系,比如常见的 switchroot: mount failed: No such file or directory 就可能是因为内核配置的时候忘了加上 root 的硬盘驱动,也可能找到驱动了但是挂载的时候发现文件系统类型不对,等等。VPSee 在一台 Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz, 4GB 机器上使用最新的 Xen 4.0.0 源代码和 CentOS 5.4 完成以下操作。这里还有在 Ubuntu 上源码安装 Xen 的详细过程。如果觉得源码安装很麻烦的话,这里有 在 CentOS 上安装和配置 Xen 的二进制安装过程。

安装需要的软件包

首先最小化安装 CentOS,然后安装编译 Xen 和 Linux xen kernel 所需要的软件包:

# yum groupinstall "Development Tools" 
# yum install hmaccalc ncurses-devel zlib-devel openssl-devel python-devel \
bridge-utils  libtool-ltdl iasl xorg-x11-drv-evdev xorg-x11-drv-fbdev \
xorg-x11-drv-i810-devel xorg-x11-drv-via-devel xorg-x11-proto-devel \
xorg-x11-server-sdk xorg-x11-xtrans-devel

安装完以上软件包后,剩下的操作就和在 Debian 上编译和安装 Xen 差不多了。

安装 Xen hypervisor 和 tools

到 http://www.xen.org/products/xen_source.html 下载最新的 Xen 源代码,然后解开、编译、安装,标准的 Linux 软件源码安装动作:

$ tar zxvf xen-4.0.0.tar.gz
$ cd xen-4.0.0/
$ make xen tools stubdom
# make install-xen install-tools install-stubdom

上面 make stubdom 的时候会从网上自动下载一些东西,所以如果是用代理上网的话需要在自己根目录下的 .wgetrc 里加上代理服务器,以便 wget 能通过代理正常下载:

$ vi .wgetrc
http_proxy = http://proxy.vpsee.com:3128/
use_proxy = on

加入到启动脚本:

# /sbin/chkconfig --add xend
# /sbin/chkconfig --add xendomains
# /sbin/chkconfig xend on
# /sbin/chkconfig xendomains on

安装 Xen 内核

下载 Linux 内核后给内核打 xen 补丁:

$ cd
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.8.tar.bz2
$ tar -xjf linux-2.6.31.8.tar.bz2

$ wget http://gentoo-xen-kernel.googlecode.com/files/
xen-patches-2.6.31-10.tar.bz2
$ mkdir xenpatch-2.6.31.8
$ cd xenpatch-2.6.31.8
$ tar -xjf ../xen-patches-2.6.31-10.tar.bz2
$ cd ..

$ cd linux-2.6.31.8
$ for i in `ls ../xenpatch-2.6.31.8/`; \
do patch -p1 < ../xenpatch-2.6.31.8/"$i"; done

配置带 xen 的 Linux 内核:

$ make menuconfig

Processor type and features --->
  [*] Enable Xen compatible kernel
Networking support --->
  Networking options --->
    <*> 802.1d Ethernet Bridging
Device Drivers --->
  XEN --->
    [*] Privileged Guest (domain 0)
     Backend driver support
       Block-device backend driver
       Block-device tap backend driver
       Block-device tap backend driver 2
       Network-device backend driver
       PCI-device backend driver
       SCSI backend driver
       USB backend driver
    <*> Block-device frontend driver
    <*> Network-device frontend driver
     SCSI frontend driver
     USB frontend driver
    <*> Framebuffer-device frontend driver
    <*>   Keyboard-device frontend driver
    [*] Disable serial port drivers
    <*> Export Xen attributes in sysfs
        Xen version compatibility (3.3.0 and later) --->
           3.3.0 and later

配置好内核参数以后,保存并退出,开始编译 Linux 内核:

$ make
$ make modules
# make modules_install
# make install
# /sbin/depmod 2.6.31.8

更新 grub:

#  vi /boot/grub/menu.lst
...
title CentOS (2.6.31.8-xen)
        root (hd0,0)
        kernel /xen-4.0.0.gz
        module /vmlinuz-2.6.31.8 ro root=/dev/VolGroup00/LogVol00
        module /initrd-2.6.31.8.img
...

重启系统,确认 Xen 安装成功:

# reboot

# uname -a
Linux localhost.localdomain 2.6.31.8 #2 SMP Tue Apr 20 11:19:19 SAST 2010 x86_64 GNU/Linux

# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  3713     4     r-----     36.0

评论 (282 Comments)

  1. 您好,按照您这个操作步骤在VMware虚拟机上测试,在#make xen tools stubdom 这步出现如下错误:
    make[8]: *** [iasl] Error 1
    make[8]: Leaving directory `/source/xen-4.0.0/tools/firmware/hvmloader/acpi’
    make[7]: *** [subdir-all-acpi] Error 2
    make[7]: Leaving directory `/source/xen-4.0.0/tools/firmware/hvmloader’
    make[6]: *** [subdirs-all] Error 2
    make[6]: Leaving directory `/source/xen-4.0.0/tools/firmware/hvmloader’
    make[5]: *** [subdir-all-hvmloader] Error 2
    make[5]: Leaving directory `/source/xen-4.0.0/tools/firmware’
    make[4]: *** [subdirs-all] Error 2
    make[4]: Leaving directory `/source/xen-4.0.0/tools/firmware’
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/source/xen-4.0.0/tools/firmware’
    make[2]: *** [subdir-install-firmware] Error 2
    make[2]: Leaving directory `/source/xen-4.0.0/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/source/xen-4.0.0/tools’
    make: *** [install-tools] Error 2
    我的本机CPU是不支持硬件虚拟化的,因此忽略这个错误继续下面的步骤。
    完全按照您上面的步骤安装完成后重启,在这个界面hang住了[]?kernel_thread_helper+0*7/0*10。请指教。

  2. 你可以不用 make stubdom,只用 make xen, make tools 就可以了。
    重启后 kernel 的错误提示是什么?

  3. 现在在这个界面,一直无变动
    [] ? kernel_thread_helper+0x7/0x10
    Timer ISR/O:Time went backwards:delta=-83×××××××××
    —–
    clocksource/0:Time went*******

  4. 在一台Dell2850上面安装xen4.0成功,
    [root@dell-xen ~]# uname -a
    Linux dell-xen.yx-tech.com.cn 2.6.18.8-xen #1 SMP Thu Apr 22 14:00:32 CST 2010 i686 i686 i386 GNU/Linux
    [root@dell-xen ~]# xm list
    Name ID Mem VCPUs State Time(s)
    Domain-0 0 3921 4 r—– 504.7
    现在唯一的问题是,我想通过virt-manager工具来图形界面管理虚拟机,但是yum安装后发现无法连上dome0
    提示:the ‘libvirtd’ daemon has been started
    unable to open connection to hypervisor url ‘xen+ssh://root@dell-xen/’:
    libvirt.libvirterror 服务器关闭连接

  5. 安装完之后,能接着安装hypervm之类的面板吗?

  6. 可以。

  7. 那你安装了 libvirt 库没?

  8. 运行安装libvirt命令,如下提示:
    Package libvirt-0.6.3-20.1.el5_4.i386 already installed and latest version

  9. 您好,xen4.0安装好了是不是直接就有qemu,libvirt了,virt-manager是不是要另外安装啊

  10. 不是的,需要另外安装。

  11. 请问下,那两个补丁,一个是linux内核,另一个只是建gentoo的domU才需要的吧

  12. $ make menuconfig

    Processor type and features —>
    [*] Enable Xen compatible kernel
    Networking support —>
    Networking options —>
    802.1d Ethernet Bridging
    Device Drivers —>
    XEN —>
    [*] Privileged Guest (domain 0)
    Backend driver support
    Block-device backend driver
    Block-device tap backend driver
    Block-device tap backend driver 2
    Network-device backend driver
    PCI-device backend driver
    SCSI backend driver
    USB backend driver
    Block-device frontend driver
    Network-device frontend driver
    SCSI frontend driver
    USB frontend driver
    Framebuffer-device frontend driver
    Keyboard-device frontend driver
    [*] Disable serial port drivers
    Export Xen attributes in sysfs
    Xen version compatibility (3.3.0 and later) —>
    3.3.0 and later

    不好意思,再请问下,这一步里面前面没有 就表示不选择吗
    如果是的话,Backend driver support这个选项不选,
    Block-device backend driver
    Block-device tap backend driver
    Block-device tap backend driver 2
    Network-device backend driver
    PCI-device backend driver
    SCSI backend driver
    USB backend driver
    这些选项都不会出现啊

  13. 这样看你需要什么,比如如果你想用 blktap 驱动而不是 loop 来访问 xen 虚拟机镜像的话就需要 Block-device tap backend driver 的支持,这样才可以在配置文件中 用 tap:aio: 替代 file: 如果你不确定的话就都选上。

  14. xen-patches-2.6.31-10.tar.bz2 是必须的,dom0 也需要。

  15. 不行啊,重装N遍CentOS5.4了,在make 时都出现:
    /root/linux-2.6.31.8/drivers/xen/blktap2/device.c:442: undefined reference to `blkback_pagemap_read’
    make: *** [.tmp_vmlinux1] Error 1

    是什么原因呢?

  16. 我的 menu.lst 文件:

    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.31.8)
    root (hd0,0)
    kernel /vmlinuz-2.6.31.8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.31.8.img
    title CentOS (2.6.18-164.el5xen)
    root (hd0,0)
    kernel /xen.gz-2.6.18-164.el5
    module /vmlinuz-2.6.18-164.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    module /initrd-2.6.18-164.el5xen.img
    ~

    reboot 后进不了2.6.31 提示错误。

  17. 你的错误提示是什么?

  18. sh /root/linux-2.6.31.8/arch/x86/boot/install.sh 2.6.31.8 arch/x86/boot/vmlinuz \
    System.map “/boot”

    *** Missing file: arch/x86/boot/vmlinuz
    *** You need to run “make” before “make install”.

    make[1]: *** [install] Error 1
    make: *** [install] Error 2

    不知道怎么回事,就是不行。唉~

  19. make 不成功:

    WARNING: modpost: Found 2 section mismatch(es).
    To see full details build your kernel with:
    ‘make CONFIG_DEBUG_SECTION_MISMATCH=y’
    GEN .version
    CHK include/linux/compile.h
    UPD include/linux/compile.h
    CC init/version.o
    LD init/built-in.o
    LD .tmp_vmlinux1
    drivers/built-in.o: In function `blktap_prep_foreign’:
    /root/linux-2.6.31.8/drivers/xen/blktap2/device.c:442: undefined reference to `blkback_pagemap_read’
    make: *** [.tmp_vmlinux1] Error 1

  20. 内核配置错误,可能依赖关系不正确,你找一个内核 default 配置文件,然后在它基础上再改,只加上 xen 选项,不碰其他选项再试试。不用重装 centos,跟重装没关系。

  21. 多少次了,如果编译成功。reboot后都是以下错误提示:
    ——————————-
    Booting ‘CentOS (2.6.31.8)
    root(hd0,0)
    filesystem ‘type is ext2fs,partition type type 0x83
    kernel /vmlinuz-2.6.31.8 ro root=/dev/VolGroup01/LogVol00 rhgb quiet
    Error 13: Invalid or unsupported executable format
    press any key to continue …

  22. 如果 google “Error 13: Invalid or unsupported executable format” 会发现 n 种原因都可能造成这类提示,需要结合自己的情况检查一下配置方面的问题。比如,root 和 (hd0,0) 之间要有空格,没空格的话也会造成这个错误提示。

  23. mount: error mounting /dev/root on /sysroot as ext3: Invalid argument
    setuproot: moving /dev failed: No such file or directory
    setuproot: error moving /proc failed: No such file or directory
    setuproot: error moving /sys failed: No such file or directory
    switchroot: mount failed: No such file or director
    Kernel panic – not syncing: Attempted to kill init!

    这种问题具体如何解决呢?

  24. 要看你机器的上下文了,单从上面信息只能判断不能 mount root 分区,这有可能你所用的文件系统是某某格式,而你内核里面没有勾上这个文件系统模块,也有可能你的 LVM 分区问题,也有可能你在 /etc/fstab 中加载分区时传递了错误参数,还有可能你忘了 mkinitrd -v -f /boot/initrd-2.6.18.img 2.6.18,或者你只拷贝内核到 /boot 后忘了拷贝相应的 initrd 镜像文件到 /boot,还有还有可能编译内核的时候 root 文件系统的格式是以模块的形式编译的,忘了 make modules_install 安装内核模块,也有 selinux 的可能。

    所以,从上面信息只能判断你的 root 分区因为某种原因导致启动的时候不能被内核加载,具体原因还要看配置和机器的上下文啊。

  25. 编译正常,启动出现如下问题
    Kernel panic – not syncing: Attempted to kill init! – msg#00381
    请问如何解释

  26. 造成 kernel panic 的原因很多,也很常见。你看看楼上的评论,也有人遇到和你类似的问题,一般来说是内核配置不正确或者说和本机的环境不搭配,请检查内核配置。

  27. vpsee,你有没有试过了xen4.0下的容错功能?是否达到了“一台物理服务器出了故障,备用虚拟机会在第二台服务器上继续运行” ?

  28. vpsee哥,实在是折腾不好,编译安装完后能正常启动系统,
    [root@dell ~]# xm list
    Name ID Mem VCPUs State Time(s)
    Domain-0 0 3921 4 r—– 1754.5
    [root@dell ~]# uname -a
    Linux dell.2850 2.6.18.8-xen #1 SMP Tue May 11 10:08:29 CST 2010 i686 i686 i386 GNU/Linux
    [root@dell ~]# xm info
    host : dell.2850
    release : 2.6.18.8-xen
    version : #1 SMP Tue May 11 10:08:29 CST 2010
    machine : i686
    nr_cpus : 4
    nr_nodes : 1
    cores_per_socket : 1
    threads_per_core : 2
    cpu_mhz : 2793
    hw_caps : bfebfbff:20100000:00000000:00000180:0000641d:00000000:00000000:00000000
    virt_caps :
    total_memory : 4095
    free_memory : 129
    node_to_cpu : node0:0-3
    node_to_memory : node0:129
    xen_major : 3
    xen_minor : 4
    xen_extra : .2
    xen_caps : xen-3.0-x86_32p
    xen_scheduler : credit
    xen_pagesize : 4096
    platform_params : virt_start=0xf5800000
    xen_changeset : unavailable
    cc_compiler : gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
    cc_compile_by : root
    cc_compile_domain : 2850
    cc_compile_date : Tue May 11 15:49:38 CST 2010
    xend_config_format : 4

    但是始终无法安装虚拟机,如下提示:
    [root@dell ~]# virt-install
    ERROR unable to connect to ‘localhost:8000’: Connection refused
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 861, in ?
    main()
    File “/usr/sbin/virt-install”, line 636, in main
    conn = cli.getConnection(options.connect)
    File “/usr/lib/python2.4/site-packages/virtinst/cli.py”, line 126, in getConnection
    conn = libvirt.open(connect)
    File “/usr/lib/python2.4/site-packages/libvirt.py”, line 159, in open
    if ret is None:raise libvirtError(‘virConnectOpen() failed’)
    libvirtError: unable to connect to ‘localhost:8000’: Connection refused

    这个提示是否是libvirt库没有安装好或者是版本没有对呢,我编译安装的是Xen3.4.2
    现在系统里的libvirt版本是libvirt-python-0.6.3-20.1.el5_4
    libvirt-0.6.3-20.1.el5_4
    请给个提示,十分感谢了。

  29. 当然可以,不过这个和 xen 无关吧,可以通过 heartbeat 实现。

  30. vpsee – May 12th, 2010 1:29 pm
    当然可以,不过这个和 xen 无关吧,可以通过 heartbeat 实现。

    完全不一样的,XEN4.0能实现两台物理机上的虚拟机内数据的同步,这个功能heartbeat怎么可能实现。

  31. 检查 service libvirtd start 看看 libvirtd 服务有没有启动;检查防火墙,看看是不是 block 了 8000;检查 selinux,最好关闭掉。

  32. 当然可以啊,用 drbd + heartbeat 就可以,drbd 通过网络完全同步整个服务器的硬盘,然后用 heartbeat 做 vps 的高可靠。1个vps down 了,另1台 mirror 服务器上的同1个 vps 马上接着来。

  33. 我的意思是: 用两台物理服务器,每台物理服务器上装20个虚拟机,但每台只运行10台虚拟机,另外10台分别做另一台的热备份。这样Xen4.0可以实现。在达到容错的同时可以负载均衡。

    如果用drbd+heartbeat 就只能利用到一台物理服务器了。

    我的QQ:78236593

  34. vpsee – May 12th, 2010 1:53 pm
    检查 service libvirtd start 看看 libvirtd 服务有没有启动;检查防火墙,看看是不是 block 了 8000;检查 selinux,最好关闭掉。
    [root@dell ~]# service libvirtd status
    libvirtd (pid 4113) is running…
    libvirtd服务已启动
    ───────────┤ Firewall Configuration ├────────────┐
    │ │
    │ A firewall protects against unauthorized │
    │ network intrusions. Enabling a firewall blocks │
    │ all incoming connections. Disabling a firewall │
    │ allows all connections and is not recommended. │
    │ │
    │ Security Level: ( ) Enabled (*) Disabled │
    │ │
    │ SELinux: Enforcing │
    │ Permissive │
    │ Disabled │
    │ │
    │ ┌────┐ ┌───────────┐ ┌────────┐ │
    │ │ OK │ │ Customize │ │ Cancel │ │
    │ └────┘ └───────────┘ └────────┘ │
    │ │
    │ │
    防火墙已经关闭,selinux也已经禁用了

  35. 我明白你的意思了。是 xen 4.0 新增的功能,不过我还没有试过。

  36. 请问这个包 iasl 该如何安装上,yum没有发现安装源,从官网下载该安装包安装后,编译也不通过。
    提示如下:
    ACPI ASL compiler (iasl) is needed
    Download and install Intel ACPI CA from
    http://acpica.org/downloads/

    make[8]: *** [iasl] Error 1
    make[8]: Leaving directory `/root/xen-4.0.0/tools/firmware/hvmloader/acpi’
    make[7]: *** [subdir-all-acpi] Error 2
    make[7]: Leaving directory `/root/xen-4.0.0/tools/firmware/hvmloader’
    make[6]: *** [subdirs-all] Error 2
    make[6]: Leaving directory `/root/xen-4.0.0/tools/firmware/hvmloader’
    make[5]: *** [subdir-all-hvmloader] Error 2
    make[5]: Leaving directory `/root/xen-4.0.0/tools/firmware’
    make[4]: *** [subdirs-all] Error 2
    make[4]: Leaving directory `/root/xen-4.0.0/tools/firmware’
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/root/xen-4.0.0/tools/firmware’
    make[2]: *** [subdir-install-firmware] Error 2
    make[2]: Leaving directory `/root/xen-4.0.0/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/root/xen-4.0.0/tools’
    make: *** [install-tools] Error 2

  37. 你需要从 http://acpica.org/downloads/ 下载、编译和安装 acpi iasl 编译器,然后再接着编译 xen.

  38. 能上传一份你编译的2.6.31的kernel的.config文件不,这样只要根据自己的硬件不同添加减少一下就完事了。

  39. 我用 CentOS5.5 + xen4.0 安装成功了,但是:

    [root@localhost ~]# virt-install
    ERROR unable to connect to ‘localhost:8000’: Connection refused
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 889, in ?
    main()
    File “/usr/sbin/virt-install”, line 628, in main
    conn = cli.getConnection(options.connect)
    File “/usr/lib/python2.4/site-packages/virtinst/cli.py”, line 126, in getConnection
    conn = libvirt.open(connect)
    File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 159, in open
    if ret is None:raise libvirtError(‘virConnectOpen() failed’)
    libvirtError: unable to connect to ‘localhost:8000’: Connection refused

    selinux 关闭的。service libvirtd start 的。防火墙关掉了,也不行。不知何故。

  40. 检查一下 xen 配置文件 /etc/xen/xend-config.sxp,看看 xend port 有没有被注释掉:

    (xend-http-server yes)
    # Port xend should use for the HTTP interface, if xend-http-server is set.
    (xend-port 8000)

  41. 打开了也不行,经过与 xen3.0的相同配置文件比较,问题好像不是在这儿

  42. 搞定了,将XEN3.0的 xend-config.sxp 复制过来后重启就可以了。

  43. 安装过程还是相当不顺利,前半部份参考你的文章,后半部分内核编译时参考了另外一篇文档,中间很多问题需要处理。最终成功实现 centos5.5+xen4.0 .

  44. 呵呵,恭喜恭喜。

  45. 谢谢谢谢vpsee ;问题还是很多啊,又有新问题:
    在创建虚拟机时出现了:

    “Unable to complete install ‘libvirt.libvirtError POST operation failed:
    xend_post:error from xen daemon:(xend.err”Error creating domain: device model ‘/usr/lib64/xen/bin/qemu-dm’not found”)Traceback (most recent call last):
    File “/usr/share/virt-manager/virtManager/create.py”,line 724,in do_install dom=guest.start_install(False,meter=meter)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”,line 541,in start_install

  46. 谢谢vpsee ,但新问题又出来了,在创建虚拟机时又出现了:
    Unable to complete install ‘libvirt.libvirtError POST operation failed: xend_post: error from xen daemon: (xend.err “Error creating domain: device model ‘/usr/lib64/xen/bin/qemu-dm’ not found”)
    Traceback (most recent call last):
    File “/usr/share/virt-manager/virtManager/create.py”, line 724, in do_install
    dom = guest.start_install(False, meter = meter)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 541, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 633, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
    File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 974, in createLinux
    if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
    libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err “Error creating domain: device model ‘/usr/lib64/xen/bin/qemu-dm’ not found”)

  47. 解决了,方法,在本机搜索到一个qemu-dm文件,复制到 /usr/lib64/xen/bin/下,重启电脑,就OK了。

  48. 我安装了好几次,都是这个问题。

  49. 新问题:
    ERROR POST operation failed: xend_post: error from xen daemon: (xend.err ‘Device 0 (vif) could not be connected. Hotplug scripts not working.’)
    Domain installation may not have been
    successful. If it was, you can restart your domain
    by running ‘virsh start centos5.5-kevin-01’; otherwise, please
    restart your installation.
    ERROR POST operation failed: xend_post: error from xen daemon: (xend.err ‘Device 0 (vif) could not be connected. Hotplug scripts not working.’)
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 889, in ?
    main()
    File “/usr/sbin/virt-install”, line 751, in main
    start_time, guest.start_install)
    File “/usr/sbin/virt-install”, line 813, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 541, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 633, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
    File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 974, in createLinux
    if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
    libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err ‘Device 0 (vif) could not be connected. Hotplug scripts not working.’)

  50. 上面的错误提示说的很清楚 (xend.err ‘Device 0 (vif) could not be connected. Hotplug scripts not working.’) 是 vif 的问题,至于什么原因导致 vif 出问题就很多了。你想用哪种方式让 domU 连接到网络?bridge, nat, route?检查 xend-config.sxp 里面的相关配置,如果是 bridge 的话看看 (network-script network-bridge) 是否打开,以及 network-bridge 脚本是否正确。

    这也许是你从 xen 3.0 直接复制 xend-config.sxp 导致的,因为你可能只复制了 xend-config.sxp,xend-config.sxp 里面所用到的脚本你没有复制(比如 network-bridge 脚本),造成你用 xen 3.0 的配置文件使用 xen 4.0 的脚本。

  51. 新问题不断,又一个问题:
    Starting install…
    Retrieving file .treeinfo… | 417 B 00:00
    Retrieving file boot.iso… | 10 MB 00:00
    ERROR Domain not found: xenUnifiedDomainLookupByName
    Domain installation may not have been
    successful. If it was, you can restart your domain
    by running ‘virsh start centos5.5-kevin-01’; otherwise, please
    restart your installation.
    ERROR Domain not found: xenUnifiedDomainLookupByName
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 889, in ?
    main()
    File “/usr/sbin/virt-install”, line 751, in main
    start_time, guest.start_install)
    File “/usr/sbin/virt-install”, line 813, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 541, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 633, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
    File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 974, in createLinux
    if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
    libvirtError: Domain not found: xenUnifiedDomainLookupByName

  52. 这可能是 SELinux labeling 问题,禁止掉 SELinux 再试试。

  53. 卡住了,禁掉,重启了也不行,还是这个提示:
    ERROR Domain not found: xenUnifiedDomainLookupByName

  54. 检查一下硬盘是否还有空间;检查一下 xen 内核是否有配置问题,比如 host 内核和 guest 内核不一致,比如 host 内核不支持 pae,但是 guest 内核支持等;检查一下 xend 的 log 文件看看有什么错误提示。

  55. vpsee:我有一个疑问,我最小化安装没有选择virtultion,按你的操作内核升完级,xen4.0安装完后,运行 virt-install 后,没有这个命令。

    但如果我yum install libvirt时,会把xen 3.0 的一些库都装上了??如:xen-libs;xen-devel .这怎么办?

  56. libvirt 实际上和 xen 没有关系的,是 redhat 公司后来开发的用来操作 xen 和 kvm 的高一层的 api/库,所以即使没有 libvirt 你也可以操作 xen。你可以下载最新的 libvirt 和 xen 一起安装。有时候 libvirt 和 xen 版本不对应的话会出现很多问题,所以要搞情哪个 xen 版本对应哪个版本的 libvirt。你可以 yum install libvirt 后再编译和安装 xen 4.0 和相应的 libvirt,覆盖原有的。

  57. 没有libvirt 如何操作 xen 呢? 如果新建一台虚拟机, 原来可以用 virt-install ,如果没有这个命令,怎么操作呢?

  58. 请教一下vpsee,按照您说的,在xen4.0该对应哪个版本的libvirt呢,CentOS5.4上的yum安装源python版本是否也对安装xen安装有影响

  59. 如果没有libvirt如何操作XEN,我的意思是如何代替virt-install命令进行虚拟机的创建安装呢?

  60. 用原始的方法啊,dd 一个 image 出来,然后在上面创建分区和文件系统,loop 挂载后拷贝一个 linux 的 / 目录到这个 image 上,拷贝和配置好相应的 kernel,最后写个 xen domU 的配置文件用 xm create 启动就可以了。

    你也可以用 qemu-img create 一个 image,然后用 qemu no-kqemu -hda /home/domU.img -cd /home/CentOS-5.5.iso -boot d -vnc 2 之类的来安装。

    安装 domU 有很多方式,最初 xen 出来的时候安装过程都很原始很麻烦的,libvirt/virt-install 之类的工具是 redhat 后来看到虚拟化的趋势以后开发的。现在还有一些安装工具是建立在 libvirt 之上的,又多了一层。

  61. 好像用 libvirt 0.7.7 配上 xen 4.0 dom0 可以,我还没有认真开始用 xen 4.0,不大清楚。如果觉得自己解决这些依赖问题很麻烦的话可以试试在最新的 Fedora 13 上直接 yum xen 4.0.

  62. open suse 11.2 和 fedora 13 上自带的,或yum的都是 xen 3.4 的版本,用yum 装 xen 4.0 目前还没发现。得手工安装。
    但opensuse 11.2 及fedora 13 的libvirt都是新版本。如fedora的libvirt 是0.7.7 ,virt-manager 是0.8.3 。

  63. 找到这里有xen-4.0.0_21091_05-2.2.x86_64.rpm OpenSuSE 6461 kB
    http://rpm.pbone.net/index.php3

    http://www.gitco.de/repo/xen4.0.0/
    这里有:xen-4.0.0-3.el5.x86_64.rpm 02-May-2010 20:01 12M 及其他关联包

  64. 好像用 libvirt 0.7.7 配上 xen 4.0 dom0 可以,xen 的很多工具脚本都是 python 写的,python 的版本可能会影响到 xen.

  65. 我还以为 fedora 13 带的是 xen 4.0 呢,不过我见过我们的一个管理员在 fedora 13 上用 xen 4.0,没有听到过他抱怨,应该还可以。那用 xen-4.0.0-3.el5.x86_64.rpm 和相关依赖包的话要比自己编译容易吧。

  66. 现在不用virt-manager了,完全使用命令,用qemu及其他方式做成了一个 img文件,但是xm start 启不起来,配置文件改了很多地方,如vif ,bridge都打开了,启动都会报(vif) could not be connected. Hotplug scripts not working 的错误。看的头都大了。就是不行。还是等 xen4.0的稳定普及吧。

  67. 检查一下 /etc/xen/xend-config.sxp 看看是不是下面两行都是正确的:
    (network-script network-bridge)
    #(network-script network-dummy)

    然后看看 /var/log/xen/ 下面的相关日志文件,比如 xend.log 和 xen-hotplug.log,看看能不能找出报错原因。

  68. 配置内核参数的时候。下面连个选项选不到*只能选成M,请问怎么办
    SCSI backend driver
    SCSI frontend driver

  69. 那就 M 啊,Linux 内核会自动装载模块的。

  70. vpsee大大 ,您好,按照您的步骤我安装一切很顺利,虚拟机在不用网络时能正常启动。但是加上网络设备后出现经典错误 Error: Device 0 (vif) could not be connected.
    现在我可能找到问题:因为我是双网卡,第一块网卡是eth0,现在有些小毛病就不用了,第二块网卡 eth1使用中。hotplus.log中显示的错误
    xenstore-read: couldn’t read path backend/vbd/10/51714/node
    Device “eth0” does not exist.

    现在我该怎么办呢??

  71. 另外,我的cent os 的brctl 只有 eth1 ->peth1的桥 , ifconfig下面只有 eth1 ,peth1,lo.
    请问我应该怎么解决呢?
    非常感谢!

  72. 在 linux 中彻底禁止掉 eth0,就像没有第一块网卡一样。

  73. 请教各位大大,我首先用virt-manager全虚拟化安装ubuntu,选的NAT,很顺利,可是客户机网卡设为DHCP总是不能上网。然后半虚拟化安装CentOS,也是选的NAT,不过在进入安装界面不久,要求设定IP,自动查找DHCP服务器失败,安装失败。而且创建虚拟机时,网络设置中,桥接选项一直不可选,请问是不是因为我的网络设置本身就有问题?
    非常感谢!!!

  74. 你的 DHCP 服务器应该是外部的,所以这个时候你想 DHCP 给你分配 IP 的话需要你的虚拟机以桥接的方式连到外面,而不是 NAT.

  75. 回复74楼
    1、按照VMware的经验,虚拟机选择NAT联网后,由Vmware提供DHCP服务,xen没这个功能是吗?
    2、我的桥接选项为何不能选呢?下面是我的xend-config.sxp文件中关于网络的设置,请问应当如何配置呢?

    谢谢!!!
    *********************************************
    ##
    # To bridge network traffic, like this:
    #
    # dom0: —————– bridge -> real eth0 -> the network
    # |
    # domU: fake eth0 -> vifN.0 -+
    #
    # use
    #
    # (network-script network-bridge)
    #
    # Your default ethernet device is used as the outgoing interface, by default.
    # To use a different one (e.g. eth1) use
    #
    # (network-script ‘network-bridge netdev=eth1’)
    #
    # The bridge is named xenbr0, by default. To rename the bridge, use
    #
    # (network-script ‘network-bridge bridge=’)
    #
    # It is possible to use the network-bridge script in more complicated
    # scenarios, such as having two outgoing interfaces, with two bridges, and
    # two fake interfaces per guest domain. To do things like this, write
    # yourself a wrapper script, and call network-bridge from it, as appropriate.
    #
    (network-script network-bridge)

    # The script used to control virtual interfaces. This can be overridden on a
    # per-vif basis when creating a domain or a configuring a new vif. The
    # vif-bridge script is designed for use with the network-bridge script, or
    # similar configurations.
    #
    # If you have overridden the bridge name using
    # (network-script ‘network-bridge bridge=’) then you may wish to do the
    # same here. The bridge name can also be set when creating a domain or
    # configuring a new vif, but a value specified here would act as a default.
    #
    # If you are using only one bridge, the vif-bridge script will discover that,
    # so there is no need to specify it explicitly.
    #
    (vif-script vif-bridge)

    ## Use the following if network traffic is routed, as an alternative to the
    # settings for bridged networking given above.
    #(network-script network-route)
    #(vif-script vif-route)

    ## Use the following if network traffic is routed with NAT, as an alternative
    # to the settings for bridged networking given above.
    #(network-script network-nat)
    #(vif-script vif-nat)

    *********************************************

  76. 请问各位大大,sudo xend reload时,报错:
    ifdown: interface ppp0 not configured
    ifdown: interface eth0 not configured
    Error: either “dev” is duplicate, or “eth0” is a garbage.
    这是怎么回事?
    谢谢各位!!!

  77. 1、xen 需要自己安装 dhcp 服务器。不过 Xen 内部有个叫做 dnsmasq 的轻型 DHCP/DNS 服务器可以用来分配 IP,配置文件在 /etc/dnsmasq.d/ 下。
    2、就你的 xend-config.sxp 文件来看,已经打开了 bridge 配置,不清楚为什么不能选择 bridge,你安装了 bridge utilities 工具包吧,试用 brctl show 检查一下。

  78. 谢谢您的指点。
    我想bridge的问题应当是因为76楼的错误。好像网络设备有问题了

  79. 再问一个菜菜的问题。
    虚拟机里的Ubuntu如何通过网桥上网呢?我的host是用的拨号上网

  80. 用网桥的话需要在 ADSL 路由器上用 DHCP 给你的虚拟机分配一个 IP. 想简单的话可以用 NAT 上网。

  81. 请教您一个问题,xm命令行工具可以改变指定VM的VCPU数量,但是需要guest操作系统支持才能起作用,请问哪些操作系统支持动态改变CPU数目呢?好像CentOS不行。谢谢!

  82. 补充,我指的是guest系统运行中的动态改变。谢谢!

  83. 你需要在 xen 虚拟机的配置文件中加入 maxvcpus = 2(假设你 CPU 有2个核),这样动态改变 CPU 数目才能生效。这些是 Xen 的设置,和 CentOS 没有关系。

  84. 您的意思是说,在虚拟机sys1的配置文件中加入maxvcpus = 2,如果guest操作系统是Centos,且系统在运行中,执行xm vcpu-set sys1 2,重新打开guest系统的system monitor,可以看到有两个CPU(默认配置一个)。是吗?我试试

  85. 还有一个问题请教,我在host上xm list时,不能列出处于关闭状态的VM,必须打开virt-manager,启动关闭的vm后,xm list才能列出这个vm,请问大概是什么问题呢?

  86. xm 没有问题。因为 xm list 就是直接打印出 active xen 虚拟机的。virt-manager 用到了 xenstore,把 vm 的状态、配置文件等信息写到了 store,所以 virt-manager 可以知道哪些是关闭的 vm,而 xm 则不知道。

  87. 按照楼主86楼的解释,xm list只能列出active的VM,也就是说处于关闭状态的VM不受xm的控制?用xm 不能启动关闭的VM?谢谢!

  88. 是否可能是环境变量之类的需要配置呢?

  89. 用 xm create 可以启动和关闭 vm. xm 和 virt-manager 是两套不同的工具,前者是 xen 社区开发的,后者是 redhat 开发的。

  90. 楼主,我想请教你一个问题。
    我在CentOS5.4的机器上用2.6.18的内核上试图从源代码安装xen-3.4。直接按照README中的指示,使用”make world” 和”make install” 安装,并生成i㎎文件。这个过程中没有问题。但是在用代xen的内核启动时会出现“switchroot mount failed”接着就“kernel panic”重启了。
    不知道楼主有没有遇见过这种情况。但还是希望楼主给我指出一个可能解决问题的方向。

  91. 嗯,首先确定关闭了 selinux,switchroot mount failed 问题多半和 SCSI 内核模块有关,用 lsmod 检查是否加载了 SCSI 相关模块,看看配置内核的时候相关 SCSI 模块、文件系统等都是不是已经包含了(比如,你的文件系统时 xfs,但是你配置 xen 内核的时候忘了加上 xfs 等)。也可能是你的 initrd 文件出了问题,用 mkinitrd 重做一个。

  92. 在安装编译xen的时候,总是提示下载内核,如何能在安装的时候选择需要的内核呢。

  93. 没有明白你的意思?Linux 内核和 xen 补丁都是需要自己下载的啊。

  94. 我最初采用的是xen中README中说的方式进行安装的
    # make world
    # make install
    在make world的过程中,需要通过git下载linux内核源码。

    但我手动的通过在网上下到它需要的内核源码,放到git下载源码存放到的地方(在网上查到的方法),可是这个时候,在make world的时候,仍然需要通过git下载源码。而且下载源码很大,时间很长,很不方便。
    有没有什么方法,通过指定xen编译时使用的内核源码,完成xen编译时对内核源码的配置工作。

  95. 你可以自己下载源码,不要用 make world 就可以了:
    make xen tools stubdom
    make install-xen install-tools install-stubdom
    如果你非要 make world 的话,可以在 Makefile 文件种找到需要的 Linux 版本号然后根据这个版本号去网上下载内核代码,下载完后放在 git 存放源码的地方(make world 时候能被知道的地方)。

  96. 在提示:ACPI ASL compiler (iasl) is needed
    Download and install Intel ACPI CA from
    http://acpica.org/downloads/后,

    去下载了acpica-unix-20100702.tar.gz 了 但当解压安装时报错:
    [root@seaside ~]# cd acpica-unix-20100702/compiler
    [root@seaside compiler]# make
    make: *** 没有规则可以创建“dbfileio.o”需要的目标“../components/debugger/dbfileio.c”。 停止。

    请问是这么回事?

  97. ASL 编译 Xen 的时候必须要的,如果你遇到 ASL 编译问题的话一个简单的办法就是直接安装二进制版本的 ASL,yum install iasl

  98. 你好,谢谢你的回复,这几天搞xen安装给我真搞郁闷了 我主要是想把libvirt升级, 用各种方式都没安装好libvirt 其中用源代码安装后,libvirt没反应,用 rpm -q libvirt显示没有安装 所有就像安装xen4.0 我需要的libvirt版本至少是0.7以上的,现在的centos libvirt版本是0.6 对于libvirt的安装博主所什么好的建议? 有rpm安装或者更新都是0.6左右的,没办法上0.7

    至于ALS的问题也够麻烦的 提示:
    [root@seaside compiler]# yum install iasl
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: mirror01.idc.hinet.net
    * base: mirror01.idc.hinet.net
    * extras: mirror01.idc.hinet.net
    * updates: mirror01.idc.hinet.net
    Setting up Install Process
    No package iasl available.
    Nothing to do

    博主,你那地方yum可以安装ASL? 要不我把yum 配置为你的那种 以便可以用yum

  99. libvirt, xen, python 这些之间都有依赖关系,版本稍不弄好就可能编译或者运行出错,不过 google 一下一般都可以解决,如果怕麻烦可以找找有没有相关的源、直接安装的。
    可以试试 rpmforge 和 EPEL 的 yum 源,里面应该有 ASL.

  100. 博主,能否麻烦你直接将你的源 张贴出来 非常谢谢,

    主要是我还不知道怎么配置rpmforge 和 EPEL

  101. $ cat rpmforge.repo

    ### Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
    ### URL: http://rpmforge.net/
    [rpmforge]
    name = Red Hat Enterprise $releasever – RPMforge.net – dag
    baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
    mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
    #mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
    enabled = 1
    protect = 0
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
    gpgcheck = 1

  102. 博主,首先感谢你的热心回复,还有点问题想请教下博主,请问博主对libvirt的是否有研究?
    能否指导下对libvrit的安装和配置?xen4.0的libvirt版本是多少? 谢谢。

  103. 编译和安装 libvirt 应该挺容易,如果不容易的话我早就写一篇日志来记录了。你执行 ./configure 的时候会提示缺少那些库,把那些库安装好后,就可以 make; make install 了,前段时间我刚编译了 libvirt 0.8.2(最新稳定版本)很顺利,与 Xen 3.1 一起使用也没问题,我猜测和 xen4.0 一起用也应该可以。

  104. 博主,编译安装libvirt的时候最主要的问题就是: ./configure的时候需要的库都解决了,然后顺利的执行make和 make install,但是在执行完 make install后,没有什么反应,用RPM -q libvirt 显示没有安装libvirt,请问安装之后需要配置什么东西或者安装之前需要清理(特别是以前的老版本),设置什么东西吗,我把先前的老libvirt0.6卸装之后再安装新的libvirt0.8 还是上诉的结果,最主要的问题就是安装之后如何配置和启动新版本的libvirt的?谢谢. 几次make install正常结束后,都没办法启动,该如何处理?谢谢

    还有就是安装libvirt的时候一定需要先安装xen吗? 因为我在卸装老版本的libvirt的时候,因依赖关系连带xen一起被卸装了,也就是说我在安装新版本的时候是没有xen的,这样可用吗?如果不可以的话,如何解决?谢谢

    另外我配置为你给我的yum源后:

    Transaction Summary
    ============================================================================================
    Install 29 Package(s)
    Update 226 Package(s)
    Remove 0 Package(s)

    Total download size: 503 M
    Is this ok [y/N]: n
    Exiting on user Command
    Complete!
    [root@seaside ~]# yum install iasl
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: mirror01.idc.hinet.net
    * base: mirror01.idc.hinet.net
    * extras: mirror01.idc.hinet.net
    * rpmforge: fr2.rpmfind.net
    * updates: mirror01.idc.hinet.net
    Setting up Install Process
    No package iasl available.
    Nothing to do

    那503M 需要下载后,才能yum install iasl吗?

  105. 我合并了你上面的3个留言,楼太高不易阅读:)

    编译安装完后的 libvirt 0.8 应该在
    # /usr/local/bin/virsh
    # /usr/local/sbin/libvirtd
    如果你直接 virsh 的话应该是你以前安装的旧版本 libvirt,你需要手动启动,路径要对。如果你执行:
    # /usr/local/bin/virsh –version
    0.8.2
    就知道是 0.8.2 版本。

    没有 libvirt 的话,xen 可用;没有 xen 的话,libvirt 用不了。你再重新 yum install xen kernel-xen 一下呗。

    相信你已经解决了 iasl 问题,不然不会通过 libvirt 编译的:D

  106. 博主 我还真没有解决iasl的问题,用的yum 还是 找不到iasl No package iasl available. 能否再指点一些咋解决?

    而且我装好libvirt0.8后,出现如下情况:
    [root@seaside ~]# /usr/local/bin/virsh –version
    0.8.0
    [root@seaside ~]# service libvirtd status
    libvirtd: 未被识别的服务

    [root@seaside ~]# /usr/local/sbin/libvirtd start
    18:56:11.663: error : qemudWritePidFile:506 : Failed to open pid file ‘/usr/local/var/run/libvirtd.pid’ : File exists

    然而查看显示’/usr/local/var/run/libvirtd.pid’ 是存在的,

    请问博主 有什么解决之道?

  107. 你找找其他源试试,我这里就只有 rpmforge 的。

    1、停止以前的 libvirtd
    # /etc/init.d/libvirtd
    2、删除 pid
    # rm /usr/local/var/run/libvirtd.pid
    3、启动新的 libvirtd
    # /usr/local/sbin/libvirtd -d
    4、查看是否成功
    # /usr/local/bin/virsh list

  108. 博主 我刚才重新安装libvirt0.8.2 在./configure时 发现一个问题 就是:
    configure: Configuration summary
    configure: =====================
    configure:
    configure: Drivers
    configure:
    configure: Xen: yes
    configure: Proxy: yes
    configure: QEMU: yes
    configure: UML: yes
    configure: OpenVZ: yes
    configure: VBox: no
    configure: XenAPI: no
    configure: LXC: yes
    configure: PHYP: no
    configure: ONE: no
    configure: ESX: no
    configure: Test: yes
    configure: Remote: yes
    configure: Network: yes
    configure: Libvirtd: yes
    configure: netcf: no
    configure: macvtap: no
    configure: virtport: no
    configure:

    从这里面可用看出不支持configure: ESX: no 为什么呢 官方文档说libvirt0.7以后就支持ESX了

    ———-

    博主 你好 你先前说你成功安装过libvirt0.8.2 那你用下面的测试命令试下:
    LIBVIRT_DEBUG=1 virsh -c xen://root@192.168.1.1 list –all

    看下输出的debug信息,有没有如下字样:” ESX ”
    我的debug信息其中在注册驱动方面是如下:
    09:10:21.315: debug : do_open:1216 : trying driver 0 (Test) …
    09:10:21.315: debug : do_open:1222 : driver 0 Test returned DECLINED
    09:10:21.315: debug : do_open:1216 : trying driver 1 (Xen) …
    09:10:21.316: debug : do_open:1222 : driver 1 Xen returned DECLINED
    09:10:21.316: debug : do_open:1216 : trying driver 2 (OPENVZ) …
    09:10:21.316: debug : do_open:1222 : driver 2 OPENVZ returned DECLINED
    09:10:21.317: debug : do_open:1216 : trying driver 3 (VBOX) …
    09:10:21.317: debug : do_open:1222 : driver 3 VBOX returned DECLINED
    09:10:21.317: debug : do_open:1216 : trying driver 4 (remote) …

    如果正确安装libvirt0.7以上 应该会出现ESX driver 等字样 非常谢谢.

  109. ESX 驱动需要 libcurl 7.18.0 以上的支持,你看看你的系统里有没有 libcurl,就算有也是老的,升级到 7.18.0 以上。

  110. 呵呵 首先谢谢楼主的热心回复,先前我在国外一篇帖子上也找到了原因,最基本的原因是libcurl版本较低,但解决了libcurl之后,还有些棘手的问题,不过现在都搞定,编译Ok,连接成功.

  111. [root@ ~]# /usr/local/sbin/libvirtd status
    15:43:26.937: warning : qemudStartup:1067 : Unable to create cgroup for driver: No such device or address
    15:43:27.139: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:27.201: warning : qemudProbeCPUModels:750 : Unexpected exit status ‘1’, qemu probably failed
    15:43:27.423: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:27.484: warning : qemudProbeCPUModels:750 : Unexpected exit status ‘1’, qemu probably failed
    15:43:27.568: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:27.697: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:27.866: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:28.167: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:28.321: warning : qemudProbeMachineTypes:515 : Unexpected exit status ‘1’, qemu probably failed
    15:43:28.546: warning : lxcStartup:1755 : Unable to create cgroup for driver: No such device or address

    请问博主 你有没有遇到这种情况? 谢谢 版本:libvirt0.7.5

  112. 你好
    我依照你的步驟從頭開始做
    從第一步到最後一步都很順利
    可是reboot之後
    發現uname -a 出來的結果還是原本的kernel
    而打xm list 會顯示 Is xend running?
    請問這樣該怎麼辦呢?
    謝謝回答!!

  113. 你可能在启动的时候没有选择 xen 内核的 linux 吧,看看你的 /boot/grub/grub.conf 配置文件是不是默认选择了 xen 启动。

  114. 對耶!
    不過我選新的內核之後出現新的問題
    錯誤訊息:
    Activating logical volumes
    Volume group “VolGroup00” not found
    Creating root device.
    Mounting root filesystem.
    mount: could not find filesystem ‘/dev/root’
    Setting up other filesystems.
    Setting up new root fs
    setuproot: moving /dev failed: No such file or directory
    no fstab.sys, mounting internal defaults
    setuproot: error mounting /proc: No such file or directory
    Switching to new root and running init.
    unmounting old /dev
    unmounting old /proc
    unmounting old /sys
    switchroot: mount failed: No such file or directory
    Kernel panic – not syncing: Attempted to kill init!
    Pid: 1, comm: init Not tainted 2.6.31.8 #1
    Call Trace:
    [ ? panic + …

    我的機器是Intel(R) Core(TM) i5
    看起來可能是內核配置沒有選好
    不過內核配置的選項好多 不知該從何改起
    請問你知道這樣該怎麼辦嗎?
    另外謝謝你的熱心回答!!
    ps.錯誤訊息手工打上去的 所以可能有typo 請見諒

  115. 有很多因素都会造成你这里说的问题,所以我没有你的环境和上下文也没法判断。检查一下你的 grub.conf 文件是否正确、检查你的 kernel 配置是否选择了 CONFIG_SYSFS_DEPRECATED_V2=Y、检查你的 root 用的什么文件系统?是否已经在 kernel 配置的时候选上了、检查你的的机器有没有 SATA 控制器是什么的?如果是 nVidia 的话是否在内核里选上了,⋯⋯

  116. 你好,我编译得 Xen 3.4.2, 在mkinitrd 时出现:
    No module ata_piix found for kernel 2.6.18.8, aborting

    请问怎么解决,谢谢

  117. SATA 控制器需要这个 ata-pii 驱动,所以你编译内核的时候需要把这个驱动(CONFIG_ATA_PIIX=y 或者 CONFIG_ATA_PIIX=m)加上,如果是 m 记得 modprobe 这个驱动模块,然后再 mkinitrd:
    # mkinitrd –builtin=ata_piix initrd-2.6.18.8 kernel-2.6.18.8

  118. 请教一个弱弱的问题:qemu-img工具是安装Xen就有的吗?在什么位置?谢谢!

  119. 需要装 qemu,一般在 /usr/bin/qemu-img

  120. 请问如果是qemu带的qemu-img,生成的磁盘能被xen直接识别吗?

  121. 当然可以。

  122. 你好,我在centOS 5.5 上编译 Xen 4.0.1, 内核编译成功后总是不能启动,出现
    Mounting root filesystem.
    mount: could not find filesystem ‘/dev/root’
    Setting up other filesystems.
    Setting up new root fs
    setuproot: moving /dev failed: No such file or directory
    no fstab.sys, mounting internal defaults
    setuproot: error mounting /proc: No such file or directory
    Switching to new root and running init.
    unmounting old /dev
    unmounting old /proc
    unmounting old /sys
    switchroot: mount failed: No such file or directory
    Kernel panic – not syncing: Attempted to kill init!

    试了各种方法还是解决不了,包括 检查 menu.lst 文件、检查kernel 配置是否选择了 CONFIG_SYSFS_DEPRECATED_V2=Y、检查 root 用的文件系统,

    我的服务器是 Dell PowerEdge SC440, intel Xeon 双核CPU 支持虚拟化,ATI显卡,在这个机器上已经成功源码装了Ubuntu 9.10下得Xen 3.4.2 (kernel 2.6.31.5), 目前机器是 Ubuntu 9.10 + centOS 5.5 双系统, 先装得Ubuntu, 后装centOS时没有装bootloader (grub),用得Ubuntu得grub来引导centOS的,
    CentOS下, 在编译Xen化的内核(2.6.31.8)时,解压缩initrd.img, 发现 initrd.img中,没有加载模块 dm_raid45.ko, 内核2.6.31.8中也没找到dm_raid45的任何文件,在centOS 5原始内核initrd.img中加载了dm_raid45, 不知道这是不是原因?谢谢

  123. 这是个常见问题,有很多原因都可以导致这个错误提示,任何导致不能正确挂载 root 都会报这个错误,这包括文件系统问题、硬盘问题、raid 驱动问题等,这个错误提示可能出现在 dom0 也可能出现在 domU,比如:root 所在文件系统但是内核不支持、raid 驱动没有加进内核、编译 xen 内核没有加入 xenblk 驱动导致 xen 挂载失败、grub root 参数部分有误,编译内核的时候漏选了某些选项,raid 驱动没有加载或者硬盘做了 raid 但是内核没有加载相关驱动,⋯⋯

  124. 我在fedora13上装了Xen 4.0.1,现在可以装全虚拟化客户端。但是通过http方式装半虚拟化客户端是,总是出现 unable to retrieve ….这个问题。请问怎么解决?

  125. http 方式必须有 http server 的支持,你用的是远程的 http location 安装的吗?还是本地网的 http server?你的 dom0 有 http server 吗?还是你的 http server 和从 Linux iso 解压出来的安装文件放在别的机器上?你用浏览器打开虚拟机的 http 安装地址,比如 http://your-http-server-ip-address/your-fedora-installation/ 看看能不能访问。

  126. 问一下,我现在要在centos 5.5 64位版上源代码安装xen 4.0.1,但对您介绍的过程还是有一点不太理解。现在make xen tools stubdom都没问题,但这个linux内核源代码和xen补丁为什么是这么选择的呢?这个linux内核源代码不是应该跟本机的linux的内核是一致的么?补丁为什么是gentoo的?

  127. xen 不是 linux kernel 的一部分,他们是两个完全不同的开发团队,因为 kernel 版本更新和发展速度太快,所以 xen 开发团队只能锁定某个版本的 kernel 然后在此基础上开发,比如 xen 开发团队开发了很长时间终于把 kernel 2.6.18.x 搞定了,结果出来了 2.6.19.x, 2.6.20.x … 2.6.35.x,xen 团队永远赶不上 kernel 团队(几千人+几十个重量级公司)的速度。所以只有特定的 linux kernel 版本和特定的 xen patch 才行。

    补丁不是 gentoo 的,只不过刚好这个 patch 放在 gentoo-xen-kernel.googlecode.com

  128. 您的意思是选择内核版本的时候是根据xen的版本来的,而不是根据当前linux版本来的?
    那不同版本xen对应的什么内核,需要什么补丁,这些信息从哪里获取?比如我现在要安装xen 4.0.1,那么我需要哪个版本内核,哪里有补丁,我怎么知道?

  129. 在 Xen 官方网站和 Wiki 就可以查到,或者用 Google.

  130. 不知道您说的是不是这个:http://wiki.xensource.com/xenwiki/XenDom0Kernels

    但这上面说从4.0开始,xen使用基于pv_ops的内核而不是xenlinux内核,不太理解是什么个意思。好像您这篇说明里用的还是xenlinux内核。

    另外我按您的说明走的,启动dom0时有一些问题,自己解决了一些,但还有一个问题始终解决不了,它说“eth0 设备的MAC 地址和预想的不符,忽略。”不知道您能不能分析一下。我是在物理机上直接装的,不存在网上说的因为虚拟机拷贝导致mac不同的问题。配置文件里可以看到mac而且是正确的

    谢谢!不好意思多有打扰。

  131. http://www.xen.org/products/xen_archives.html 里面有所有的 xen 版本,每个版本都有 Release Notes,每个 Release Notes 都详细的说明了需要哪个版本的 Linux kernel(Xen hypervisor and supported dom0 Linux kernels)。

    http://wiki.xensource.com/xenwiki/XenParavirtOps 这里有 paravirt_ops 的介绍。

  132. 看了一下,大概理解就是pv_ops就是可以通过配置让linux内核具有在bare-metal上运行,在半虚拟化的虚拟环境里运行(比如xen的domU)和当xen的dom0这三种能力。这种情况下,就不需要补丁了

    不过使用了这种方法之后,还是跟之前一样出问题,看来问题在网卡上,搜索了google上的很多资料也搞不定,看来只能换机器试试。

  133. 我有一个iso安装盘文件,请问可不可以用xm命令以网络安装的方式创建一个半虚拟化的guest,即通过配置一个文件,如guest.cfg,其中指定iso文件的网络位置(如nfs),然后 xm create guest.cfg, 该种方式可行吗?

    我知道,virt-install可以的,但我想用xm命令,谢谢!

  134. 可以,不过要看什么 iso,不是所有的 linux iso 都支持被安装成 xen pv domu 的。如果你安装 netbsd iso 的话可以在 guest.cfg 改成下面这个样子,然后 xm create guest.cfg:
    disk = [ ‘file:/home/vpsee/netbsd.img,xvda,w’, ‘file:/home/vpsee/amd64cd-5.0.1.iso,ioemu:hdc:cdrom,r’ ]

  135. 谢谢, 但其中的参数,如kernel=, ramdisk=, root=,boot=, 不知如何配,不知能不能给我个完全的guest.cfg配置文件。

  136. 是这样的我在一台虚拟机里面通过yum的方式安装XEN。结果装完之后
    服务启不来。
    [root@XENTEST mnt]# /usr/sbin/xenstored
    [root@XENTEST mnt]# FATAL: Failed to initialize dom0 state: No such file or directory
    是什么原因呢?烦请告之一下谢谢

  137. 我编译时也报如下错误

    WARNING: vmlinux.o (__xen_guest): unexpected non-allocatable section.
    Did you forget to use “ax”/”aw” in a .S file?
    Note that for example contains
    section definitions for use in .S files.

    WARNING: modpost: Found 2 section mismatch(es).
    To see full details build your kernel with:
    ‘make CONFIG_DEBUG_SECTION_MISMATCH=y’
    GEN .version
    CHK include/linux/compile.h
    UPD include/linux/compile.h
    CC init/version.o
    LD init/built-in.o
    LD .tmp_vmlinux1
    drivers/built-in.o: In function `blktap_prep_foreign’:
    /usr/src/linux-2.6.31.8-xen/drivers/xen/blktap2/device.c:442: undefined reference to `blkback_pagemap_read’
    make: *** [.tmp_vmlinux1] Error 1
    [root@oracle linux-2.6.31.8-xen]#

  138. 一种可能是,你在配置内核的时候用的是 XEN –> Block-device tap backend driver ,需要把 y 改成 m,也就是说把这个 blktap 驱动编译成模块形式加载到内核(而不是直接编译到内核里),否则就会出现 undefined reference to `blkback_pagemap_read’ 错误。

  139. 真是十分感谢。
    这么及时回复

  140. Block-device tap backend driver 默认就是编译为模块,是不是少选择了编译项目呢?

    [root@oracle linux-2.6.31.5]# grep XEN .config
    CONFIG_X86_64_XEN=y
    CONFIG_XEN_PCIDEV_FRONTEND=y
    # CONFIG_XEN_PCIDEV_FE_DEBUG is not set
    CONFIG_NETXEN_NIC=m
    CONFIG_XEN=y
    CONFIG_XEN_INTERFACE_VERSION=0x00030207
    # XEN
    CONFIG_XEN_PRIVILEGED_GUEST=y
    # CONFIG_XEN_UNPRIVILEGED_GUEST is not set
    CONFIG_XEN_PRIVCMD=y
    CONFIG_XEN_XENBUS_DEV=y
    CONFIG_XEN_NETDEV_ACCEL_SFC_UTIL=m
    CONFIG_XEN_BACKEND=y
    CONFIG_XEN_BLKDEV_BACKEND=m
    CONFIG_XEN_BLKDEV_TAP=m
    CONFIG_XEN_BLKDEV_TAP2=y
    CONFIG_XEN_BLKBACK_PAGEMAP=y
    CONFIG_XEN_NETDEV_BACKEND=m
    CONFIG_XEN_NETDEV_TX_SHIFT=8
    # CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set
    CONFIG_XEN_NETDEV_LOOPBACK=m
    CONFIG_XEN_PCIDEV_BACKEND=m
    CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
    # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
    # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
    # CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
    # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
    # CONFIG_XEN_TPMDEV_BACKEND is not set
    CONFIG_XEN_SCSI_BACKEND=m
    CONFIG_XEN_USB_BACKEND=m
    CONFIG_XEN_BLKDEV_FRONTEND=m
    CONFIG_XEN_NETDEV_FRONTEND=m
    CONFIG_XEN_NETDEV_ACCEL_SFC_FRONTEND=m
    CONFIG_XEN_SCSI_FRONTEND=m
    CONFIG_XEN_USB_FRONTEND=m
    CONFIG_XEN_USB_FRONTEND_HCD_STATS=y
    CONFIG_XEN_GRANT_DEV=y
    CONFIG_XEN_FRAMEBUFFER=y
    CONFIG_XEN_KEYBOARD=y
    # CONFIG_XEN_DISABLE_SERIAL is not set
    CONFIG_XEN_SYSFS=y
    CONFIG_XEN_NR_GUEST_DEVICES=256
    CONFIG_XEN_COMPAT_030002_AND_LATER=y
    # CONFIG_XEN_COMPAT_030004_AND_LATER is not set
    # CONFIG_XEN_COMPAT_030100_AND_LATER is not set
    # CONFIG_XEN_COMPAT_030200_AND_LATER is not set
    # CONFIG_XEN_COMPAT_030300_AND_LATER is not set
    # CONFIG_XEN_COMPAT_LATEST_ONLY is not set
    CONFIG_XEN_COMPAT=0x030002
    CONFIG_XEN_SMPBOOT=y
    CONFIG_XEN_DEVMEM=y
    CONFIG_XEN_BALLOON=y
    CONFIG_XEN_SCRUB_PAGES=y
    [root@oracle linux-2.6.31.5]#

  141. 如果 XEN_BLKDEV_BACKEND 是 m 的话,CONFIG_XEN_BLKDEV_TAP2 和 XEN_BLKBACK_PAGEMAP 也应该是 m,他们之间有依赖关系,你再试试。应该是下面这个样子:
    CONFIG_XEN_BLKDEV_BACKEND=m
    CONFIG_XEN_BLKDEV_TAP=m
    CONFIG_XEN_BLKDEV_TAP2=m
    CONFIG_XEN_BLKBACK_PAGEMAP=m

  142. 谢谢啦!!改为模块方式就编译通过了

    [root@oracle linux-2.6.31.5-xen]# grep XEN .config|grep BLK
    CONFIG_XEN_BLKDEV_BACKEND=m
    CONFIG_XEN_BLKDEV_TAP=m
    CONFIG_XEN_BLKDEV_TAP2=m
    CONFIG_XEN_BLKBACK_PAGEMAP=m
    CONFIG_XEN_BLKDEV_FRONTEND=m
    [root@oracle linux-2.6.31.5-xen]#

  143. 又出现问题.
    Started domain centos5 (id=33)
    dmi check: not initialized yet.
    dmi check: not initialized yet.
    dmi check: not initialized yet.

    解决办法是取消 Enable DMI scanning重新编译安装。
    结果又报如下错误。

    pyGRUB version 0.6
    lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
    x CentOS (2.6.31.5) x
    x CentOS (2.6.18-194.el5xen) x
    x x
    x x
    x x
    x x
    x x
    x x
    mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
    Use the ^ and v keys to select which entry is highlighted.
    Press enter to boot the selected OS, ‘e’ to edit the
    commands before booting, ‘a’ to modify the kernel arguments
    before booting, or ‘c’ for a command line.

    Started domain centos5 (id=38)
    PCI: Fatal: No config space access function found
    i8042.c: No controller found.
    Kernel panic – not syncing: Attempted to kill init!
    [root@UNI-TY-2-N012-FD-BBG-SZ xen]#

    请帮忙看看

  144. 楼主您好,看了您的文章很有启发。
    现在我碰到这样一个问题。
    我使用CentOS, 使用二进制安装的xen,也安装了libvirt 0.6.3
    后来我下载libvirt 0.8.4源码,configure make make install 了之后
    现在运行virsh会出现如下提示:

    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.2′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.1′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.5′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.1′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.0′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.2′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.3′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.0′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.8.4′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.7′ not found (required by virsh)
    virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.6.4′ not found (required by virsh)

    我实在是摸不着头脑,不知您可有什么办法?谢谢

  145. @lancer
    你确定你运行的 virsh 是 libvirt 0.8.4 里面的 virsh 吗?不是原来那个 virsh 吗?你编译后的新 libvirtd 是否替代旧的 libvirtd 启动了?编译安装完后的 libvirt 0.8 应该在:
    # /usr/local/bin/virsh
    # /usr/local/sbin/libvirtd

  146. 我不确定新的libvirt是否替代了旧的。
    不过,运行# /usr/local/bin/virsh和# /usr/local/sbin/libvirtd会出现类似的错误。
    # /usr/local/bin/virsh

    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.2′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.1′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.5′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.1′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.0′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.2′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.3′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.0′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.8.4′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.7′ not found (required by /usr/local/bin/virsh)
    /usr/local/bin/virsh: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.6.4′ not found (required by /usr/local/bin/virsh)

    # /usr/local/sbin/libvirtd
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.2′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.1′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.5′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.1′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.0′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.3′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.6.4′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.8.0′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.7′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_0.7.2′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.8.4′ not found (required by /usr/local/sbin/libvirtd)
    /usr/local/sbin/libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.8.4′ not found (required by /usr/local/lib/libvirt-qemu.so.0)

    是否还需要提供些什么信息?

  147. 最后make uninstall了0.8.4的libvirt,rpm reinstall libvirt重装了0.6.3的版本,现在virsh正常了

  148. 楼主您好,我没有安装XEN,我就是在CentOS5.5上想学习virt-install,这是我运行的命令:
    #virt-install -n wzh -r 256 -f /var/lib/libvirt/images/wzh.img -s 2 -l nfs://192.168.210.20/project/centos5_iso,然后也出现了和46楼类似的错误:
    Starting install…
    Retrieving file .treeinfo… | 417 B 00:00
    Retrieving file vmlinuz… | 1.9 MB 00:01
    Retrieving file initrd.img… | 7.7 MB 00:07
    ERROR internal error Domain wzh didn’t show up

    Domain installation may not have been
    successful. If it was, you can restart your domain
    by running ‘virsh start wzh’; otherwise, please
    restart your installation.
    ERROR internal error Domain wzh didn’t show up
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 889, in ?
    main()
    File “/usr/sbin/virt-install”, line 751, in main
    start_time, guest.start_install)
    File “/usr/sbin/virt-install”, line 813, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 541, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 633, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
    File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 974, in createLinux
    if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’, conn=self)
    libvirtError: internal error Domain wzh didn’t show up
    我看了下你们的对话,最后好像也没正确找到问题在哪?原因在哪呢?还请不吝赐教,非常感感谢~

  149. @kakaflong
    我没有太明白你的意思,没有安装 xen 怎么用 virt-install 呢?virt-install 是用来安装基于 xen/kvm 等的虚拟机安装工具。那你安装了 kvm 吗?

  150. 哦,我是安装了KVM,不好意思,我对xen,kvm还不是很理解,新手,呵呵 见谅~
    我的/var/log/libvirt/qemu/wzh.log内容如下:
    LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/bin/qemu-system-x86_64 -S -M rhel5.4.0 -no-kqemu -m 256 -smp 1 -name wzh -uuid eb32462c-e63b-8099-09b3-9b5d4dbd7fea -monitor pty -pidfile /var/run/libvirt/qemu//wzh.pid -no-reboot -boot c -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.C8F8ZA -initrd /var/lib/libvirt/boot/virtinst-initrd.img.iHvBNe -append method=nfs:192.168.210.20:/project/centos5_iso -drive file=/var/lib/libvirt/images/wzh.img,if=ide,index=0,cache=none -net nic,macaddr=54:52:00:62:5b:7a,vlan=0 -net tap,fd=17,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us
    Supported machines are:
    pc Standard PC (default)
    isapc ISA-only PC
    是不是我的机器类型不支持?还是qemu的版本和我要安装的虚拟机类型不兼容?
    # rpm -qa | grep qemu
    qemu-common-0.10.5-1.el5.2
    kvm-qemu-img-83-164.el5_5.21
    qemu-system-x86-0.10.5-1.el5.2

    # rpm -qa | grep libvirt
    libvirt-0.6.3-33.el5_5.3
    libvirt-devel-0.6.3-33.el5_5.3
    libvirt-0.6.3-33.el5_5.3
    libvirt-python-0.6.3-33.el5_5.3
    libvirt-devel-0.6.3-33.el5_5.3
    防火墙的配置如下: cat /etc/selinux/config
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    # enforcing – SELinux security policy is enforced.
    # permissive – SELinux prints warnings instead of enforcing.
    # disabled – SELinux is fully disabled.
    SELINUX=disabled
    # SELINUXTYPE= type of policy in use. Possible values are:
    # targeted – Only targeted network daemons are protected.
    # strict – Full SELinux protection.
    SELINUXTYPE=targeted

    # SETLOCALDEFS= Check local definition changes
    SETLOCALDEFS=0

  151. @kakaflong
    那你需要首先检查 CPU 是否支持虚拟化,可以先看这篇文章:在 CentOS 上安装和配置 KVM.

  152. 谢谢搂主,你的这篇文章对我很有帮助,我看了一下我的CPU是支持虚拟化的,因为是intel的,所以是vmx;后来我发现我先启动了一个virtual box(里面运行的xp),而virtual box在启动的时候告诉我:
    VirtualBox can’t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).所以我就用modprobe -r kvm_intel把kvm模块给去掉了,应该是virtual box和kvm冲突吧?然后我重启了系统,(系统启动的时候kvm模块默认是加载的),然后用virt-install –prompt按照提示可以正常创建虚拟机,但是也有个疑问:用virt-viewer没反应,但可以用vncviewer,在VNC的窗口里添上127.0.0.1:0就可以连上我创建的虚拟机,然后一步步操作就行了,我想问:vncviewer行 virt-viewer 我创建的虚拟机名 为什么不行呢?
    最后我又试了一下我这条命令:#virt-install -n wzh -r 256 -f /var/lib/libvirt/images/wzh.img -s 2 -l nfs://192.168.210.20/project/centos5_iso或者#virt-install -n wzh -r 256 -f /var/lib/libvirt/images/wzh.img -s 2 -l /root/centos5.5_64.iso还是有那几行错误,这究竟是为什么呢?

  153. @kakaflong
    对你的环境不了解,这里只能猜测,怀疑由于某种原因你的 kvm 不是你默认的 hypervisor,如果不是默认的话,virt-viewer 和 virt-install 这两个工具都需要 –connect=CONNECT 参数来连接虚拟机,你添加上这个参数试试。

  154. vpsee 你好!
    我现在已经启动了xend,在用virt-install装虚拟机的时候报错了。

    ERROR Could not find a kernel path for virt type ‘xen’

    我检查过paravirt,全部都已经开启了,我的CPU不支持vmx,但是半虚拟化不可以安装ubuntu的虚拟机吗?

  155. @buaacss
    半虚拟化当然可以安装 Ubuntu,但是不能从 ISO 文件直接装,安装源必须是 NFS 或者 HTTP.

  156. 恩我是从http装的,但是不知道为什么会出现那个ERROR,
    这个是我使用的安装地址:http://cn.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/
    在下载了一个MAINFEST之后就ERROR了

  157. 你好vpsee,请教下:
    我有3台机器A B C,都是RHEL5.5系统,内核版本为2.6.18-194.

    A和B是使用红帽自带的虚拟化软件安装,A和B迁移什么的都没任何问题,xen版本是3.0.3.

    机器C是源码安装的xen3.4.3,对应的kernel是2.6.18.8-xen。安装好后domain0可以起来,也可以创建新的VM实例。但出现了2个问题:
    1. 执行从C到B(或到A)实时迁移的时候出现“endpoint is not connected”
    我的防火墙都关了,xend-config文件应该没问题,和AB一样的。但就是迁移不了。
    2. 无法进入图形界面,出现的提示为:
    failed to start The X server (your graphical interface). It is likely that it
    is not set up correctly.
    X server Output :
    X window System Version 7.1.1
    X protocol version 11,revision 0 ,Release 7.1.1
    Build Operating System :Linux 2.6.18-164.11.1.el5 x86_64 Red hat
    Current Operating System: Linux 2.6.18.8-xen
    这意思是不是说我现在系统安装的X window系统是在2.6.18-164上编译的,而现在2.6.18.8-xen这个系统版本低的问题?当然源码安装xen前用的2.6.18-194这个系统是可进入图形界面的。

  158. 1. 实时迁移要求 The same version of XEN on both hosts,各个 host 上需要使用同一版本的 xen;
    2. 嗯,表明看上去 x window 和 xen 没关系,实际上还是有联系的,你可以看看我前几天写的 “Debian 上 Xen 和 X 之间的 bug”。

  159. 09:21:22.874: error : virRunWithHook:857 : internal error ‘/sbin/iptables –table filter –insert FORWARD –destination 192.168.122.0/255.255.255.0 –out-interface virbr0 –match state –state ESTABLISHED,RELATED –jump ACCEPT’ exited with non-zero status 1 and signal 0: iptables: Unknown error 18446744073709551615

    09:21:22.874: error : networkAddMasqueradingIptablesRules:637 : failed to add iptables rule to allow forwarding to ‘virbr0’: Invalid argument
    09:21:23.355: warning : qemudStartup:1631 : Unable to create cgroup for driver: No such device or address
    ^C09:28:35.760: warning : qemudDispatchSignalEvent:396 : Shutting down on signal 2
    我在centOS 5.5 64位上装的xen-4.0.0,xm list成功了,但是我源码安装libvirt-0.8.2,运行/usr/local/sbin/libvirtd start,出现上面错误,在/etc/init.d/下面找不到libvirtd,请各位大侠帮我解惑吧!

  160. 新版的 libvirt 使用了一个新的 iptables 参数,问题是这个参数需要得到内核的支持,你看看编译 xen/linux 内核有没有漏掉这个 “NETFILTER_XT_TARGET_CHECKSUM” 选项。

  161. 进行xen编译时,“make xen”没问题,但是“make tools”就会报如下错误:
    In file included from tapdisk-queue.c:44:
    libaio-compat.h:82:3: error: #error __NR_eventfd?
    make[5]: *** [tapdisk-queue.o] Error 1
    make[5]: Leaving directory `/home/ssakdeo/workarea/xen-4.0.1/tools/blktap2/drivers’
    make[4]: *** [subdir-install-drivers] Error 2
    make[4]: Leaving directory `/home/ssakdeo/workarea/xen-4.0.1/tools/blktap2′
    make[3]: *** [subdirs-install] Error 2
    make[3]: Leaving directory `/home/ssakdeo/workarea/xen-4.0.1/tools/blktap2′
    make[2]: *** [subdir-install-blktap2] Error 2
    make[2]: Leaving directory `/home/ssakdeo/workarea/xen-4.0.1/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/home/ssakdeo/workarea/xen-4.0.1/tools’
    make: *** [install-tools] Error 2

    请问这是什么原因引起的?

  162. @dabing800
    检查一下内核选项有没有选择 CONFIG_EVENTFD=y

  163. xen/xen_hypervisor.c: In function ‘xenHypervisorDomainGetOSType’:
    xen/xen_hypervisor.c:2838: error: ‘DOMFLAGS_HVM’ undeclared (first use in this function)
    xen/xen_hypervisor.c:2838: error: (Each undeclared identifier is reported only once
    xen/xen_hypervisor.c:2838: error: for each function it appears in.)
    xen/xen_hypervisor.c: In function ‘xenHypervisorGetDomInfo’:
    xen/xen_hypervisor.c:3099: error: ‘DOMFLAGS_HVM’ undeclared (first use in this function)
    make[3]: *** [libvirt_driver_xen_la-xen_hypervisor.lo] Error 1
    make[3]: Leaving directory `/root/lib/libvirt-0.8.6/src’
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/root/lib/libvirt-0.8.6/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/lib/libvirt-0.8.6′
    make: *** [all] Error 2

    编译libvirt的时候出现这种错误是什么原因?

  164. @cuc
    可能你编译的 libvirt 和 xen 版本不匹配,导致 DOMFLAGS_HVM 没有在相关的头文件中找到声明。

  165. 你好,
    因為我們家的設備太高檔,得用到xen4才能抓到196g ram & 4*8 core * 2hyper 的cpu,目前實驗結果是kernel 2.6.32.26 + xen 4.0.1可以正常開機,但是bridge部分我就搞不定了,下ifconfig只會看到eth0跟peth0,xenbr0完全看不到,就算重下network-bridge指令也一樣,在kernel config時,也有設 config_bridg=y~

  166. @Kira
    196GB RAM 很给力啊,CentOS/Xen Unstable 应该最大可以支持到 256GB 内存,不过好像需要修改内核的几个地方,好像还需要 patch.

  167. 我在debian 5.07下安装xen
    同样也是只有eth0和peth0.没有xenbr0
    还希望vpsee给说说是什么原因造成没有xenbr0呢

  168. Xen我上到3.4的版本,196G已經沒問題,但不曉得為何CPU只能抓到32core,hyper thread好像抓不到~所以我才想請教自行用source+kernel的方式,要怎麼解決掉沒有virtual bridge的問題,vpsee難道都沒遇到過嗎?

  169. @Kira
    没有机会遇到啊,我现在手上最大的机器也才 128GB:),看了一下 rhel/xen 文档,估计需要 patch 才能抓到 > 32 cpu cores:
    最大内存限制是:

    x86_64 – ~64GB GA kernel, ~256GB day0 errata kernel
    i386 – ~16GB (no 4G/4G support)

    最大 CPU 限制是:

    i386 – 32 processors on HV, 32 processors on dom0/domU
    x86_64 – 32 processors on HV, 32 processors on dom0/domU

    不知道你的 virtual bridge 遇到啥问题?处理 bridge 的只不过是几个脚本 network-bridge/vif-bridge,应该和大内存没多大关系啊。

  170. @vpsee
    我照此篇步驟都裝好了,但就是不會出現xenbr0這個virtual bridge,會跟libvirt有關係嗎?

  171. @vpsee
    其實我是想知道,您裝好後是不是virtual bridge都有正常帶起來~

  172. #xm list
    Name ID Mem VCPUs State Time(s)
    Domain-0 0 3396 4 r—– 37.9
    centos 512 1 0.0
    centos5.532 512 1 0.0

    vpsee 請教一下,我半虛擬安裝完後卻無法啟動(xm create centos),並且重開XEND之後xm list清單還是存在,但用全虛擬的方式就可以,請問這是為什麼??

  173. 您好 : 为什么 我能看到xm list 可以看到domain0,而service xend status 看不到任何信息啊

  174. 而且虚拟网卡virbr0 xenbr0都没有

  175. ERROR unable to connect to ‘localhost:8000′: Connection refused
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 861, in ?
    main()
    File “/usr/sbin/virt-install”, line 636, in main
    conn = cli.getConnection(options.connect)
    File “/usr/lib/python2.4/site-packages/virtinst/cli.py”, line 126, in getConnection
    conn = libvirt.open(connect)
    File “/usr/lib/python2.4/site-packages/libvirt.py”, line 159, in open
    if ret is None:raise libvirtError(‘virConnectOpen() failed’)
    libvirtError: unable to connect to ‘localhost:8000′: Connection refused

    这个问题一般是因为配置文件导致的,确保 /etc/xen/xend-config.sxp中以下三行没有被注释掉:
    (xend-http-server yes)
    (xend-port 8000)
    (xend-address localhost)

  176. 请问CentOS 5.5 32位的能安装xen4吗

  177. [root@\325\271\314\374\327\3631 xen-4.0.1]# make xen
    make -C xen install
    make[1]: Entering directory `/root/xen-4.0.1/xen’
    make -f Rules.mk _install
    dnsdomainname: Unknown server error
    make[2]: Entering directory `/root/xen-4.0.1/xen’
    make -C tools
    make[3]: Entering directory `/root/xen-4.0.1/xen/tools’
    [ -d figlet ] && make -C figlet
    make[4]: Entering directory `/root/xen-4.0.1/xen/tools/figlet’
    make[4]: `figlet’ is up to date.
    make[4]: Leaving directory `/root/xen-4.0.1/xen/tools/figlet’
    make symbols
    make[4]: Entering directory `/root/xen-4.0.1/xen/tools’
    make[4]: `symbols’ is up to date.
    make[4]: Leaving directory `/root/xen-4.0.1/xen/tools’
    make[3]: Leaving directory `/root/xen-4.0.1/xen/tools’
    make -f /root/xen-4.0.1/xen/Rules.mk include/xen/compile.h
    make[3]: Entering directory `/root/xen-4.0.1/xen’
    sed: -e expression #5, char 42: invalid reference \3 on `s’ command’s RHS
    make[3]: *** [include/xen/compile.h] Error 1
    make[3]: Leaving directory `/root/xen-4.0.1/xen’
    make[2]: *** [/root/xen-4.0.1/xen/xen] Error 2
    make[2]: Leaving directory `/root/xen-4.0.1/xen’
    make[1]: *** [install] Error 2
    make[1]: Leaving directory `/root/xen-4.0.1/xen’
    make: *** [install-xen] Error 2
    how can I fix this problem? thanks

  178. 我也是安装编译以后reboot,一直停在在这个界面,无变动
    [] ? kernel_init
    [] ? kernel_thread_helper+0×7/0×10

    请问这是什么原因导致的

  179. $ make menuconfig

    Processor type and features —>
    [*] Enable Xen compatible kernel
    Networking support —>
    Networking options —>
    802.1d Ethernet Bridging
    Device Drivers —>
    XEN —>
    [*] Privileged Guest (domain 0)
    Backend driver support
    Block-device backend driver
    Block-device tap backend driver
    Block-device tap backend driver 2
    Network-device backend driver
    PCI-device backend driver
    SCSI backend driver
    USB backend driver
    Block-device frontend driver
    Network-device frontend driver
    SCSI frontend driver
    USB frontend driver
    Framebuffer-device frontend driver
    Keyboard-device frontend driver
    [*] Disable serial port drivers
    Export Xen attributes in sysfs
    Xen version compatibility (3.3.0 and later) —>
    3.3.0 and later
    VPSEE大人,在这步,对内核进行进配置的时候有,[*]标记的,我都知道应该选上,但是那些没有标记的选项怎么处理?不选?还是默认?
    麻烦一下vpsee,把回复发到我的邮件吧shixing.yan@qq.com,我怕你回复到这里后,我会看不到。

  180. @拾星
    和 xen 无关的默认就可以了,其他是配置 linux 内核、设备驱动、文件系统之类的,和自己的机器有关,如果不确定可以参考 linux 内核编译方面的资料。

  181. hi vpsee大大

    按照你的方法 编译没问题 reboot报错 不知道出了啥状况

    错误同 @tfly

    我也是安装编译以后reboot,一直停在在这个界面,无变动
    [] ? kernel_init
    [] ? kernel_thread_helper+0×7/0×10

    请问这是什么原因导致的

  182. vpsee大大 问题解决 是linux+xen内核配置不对 (具体哪不对我还不知道)

    我使用centos5.6 yum安装留下的config文件 cp 然后load

    再修改
    “make menuconfig中,xen—>选项下Block-device tap中的相应选项有选择为*的,修改为M”

    就OK了

    目前 xm list 没有问题 谢谢教程分享! xen新手 有问题还请多多指点 ~~

  183. 问题

    同@Kira

    找不到 xenbr0

  184. 你好,vpsee,我在装xen4.0+linux2.6.32.43-pv_ops的时候找不到 blktap2 这个内核配置选项,在make menucofnig 里没有,.config里也没有,直接在/tools/blktap2这个目录下按照它给的README编译安装,没有报错,但仍然没有这个模块,只产生了libvhd.so的文件,要怎么找到blktap2这个模块?
    谢谢!

  185. 补充:
    其他虽然都点小问题,但都能用,就blktap2这个模块,找了N久,都没找到,google也翻的差不多了,没有看到类似情况

  186. @stone
    blktap2 应该是在 xen 里,不是在 linux kernel 里。

  187. 你好,vpsee。我是完全按照这篇文章安装的。在内核编译之后,/boot/grub/menu.lst的内容如下所示:
    title CentOS (2.6.31.8)
    root (hd0,7)
    kernel /vmlinuz-2.6.31.8 ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.31.8.img

    title CentOS (2.6.18-238.19.1.el5)
    root (hd0,7)
    kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.18-238.19.1.el5.img
    title CentOS (2.6.18-238.el5)
    root (hd0,7)
    kernel /vmlinuz-2.6.18-238.el5 ro root=LABEL=/ rhgb quiet
    initrd /initrd-2.6.18-238.el5.img
    title Other
    rootnoverify (hd0,0)
    chainloader +1
    在终端输入xend后显示如下错误:
    xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
    Traceback (most recent call last):
    File “/usr/sbin/xend”, line 36, in ?
    from xen.xend.server import SrvDaemon
    File “usr/lib64/python2.4/site-packages/xen/xend/server/SrvDaemon.py”, line 26, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/server/relocate.py”, line 28, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py”, line 36, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py”, line 20, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/image.py”, line 46, in ?
    xen.lowlevel.xc.Error: (1, ‘Internal error’, ‘xc_interface_open failed: No such file or directory’)

    请问,出现这种情况是什么原因?该如何解决?

  188. @vpsee
    我在 /tools/blktap2/ 这个目录下也 make && make install 了,没有报错,但也没有产生blktap2 阿,目前装虚拟机用tap有问题, 改成tap2就好了,vhd 格式的映像文件,xm create **.cfg && xm console **.cfg安装过程没报错, 但装完再 xm create **.cfg启动时,就提示找不到**.vhd 文件 ,应该还是没有blktap2模块阿 ,下一步该怎么办?

  189. @vpsee
    搞定了,没有blktap2这个模块,问题的原因是tools里有bug,打了几个补丁就好了。

  190. vpsee大侠,我按照你说的方法已经在X86_64机器,OS为CentOS 5.1 final上成功安装了XEN 4.1.0和domain 0 (linux-2.6.31.8),xm list 和xend可以正常运行。但是在用工具virt-manager安装DomainU的时候出错(使用cdrom安装,还是CentOS 5.1 final)。而且reboot之后,xend 和xm list都无法运行了。我看了你以前和网友的日志对话,发现也有人遇到类似的问题,查了下virsh版本是0.8.2。但不知道下面如何做才能解决问题。错误细节如下:
    一、 virt-install 安装DomainU出错
    [root@localhost ~]# virt-install
    ERROR A name is required for the virtual machine. (use –prompt to run
    interactively)
    [root@localhost ~]# virt-install -n vm1 -r 512 –vcpus=1
    –file=/root/virtual/vm1/vm1.img -l /media/CentOS_5.1 Final

    Starting install…
    Retrieving file .treeinfo… | 440 B 00:00
    Retrieving file vmlinuz… | 1.9 MB 00:00
    Retrieving file initrd.img… | 6.3 MB 00:00
    ERROR POST operation failed: xend_post: error from xen daemon: (xend.err
    ‘Device 0 (vif) could not be connected. Hotplug scripts not working.’)
    Domain installation may not have been
    successful. If it was, you can restart your domain
    by running ‘virsh start vm1’; otherwise, please
    restart your installation.
    ERROR POST operation failed: xend_post: error from xen daemon: (xend.err
    ‘Device 0 (vif) could not be connected. Hotplug scripts not working.’)
    Traceback (most recent call last):
    File “/usr/sbin/virt-install”, line 889, in ?
    main()
    File “/usr/sbin/virt-install”, line 751, in main
    start_time, guest.start_install)
    File “/usr/sbin/virt-install”, line 813, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 541, in
    start_install
    return self._do_install(consolecb, meter, removeOld, wait)
    File “/usr/lib/python2.4/site-packages/virtinst/Guest.py”, line 633, in
    _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
    File “/usr/lib64/python2.4/site-packages/libvirt.py”, line 974, in
    createLinux
    if ret is None:raise libvirtError(‘virDomainCreateLinux() failed’,
    conn=self)
    libvirtError: POST operation failed: xend_post: error from xen daemon:
    (xend.err ‘Device 0 (vif) could not be connected. Hotplug scripts not
    working.’)
    二、xm list & xend命令出错
    [root@localhost bin]# xend
    Traceback (most recent call last):
    File “/usr/sbin/xend”, line 36, in ?
    from xen.xend.server import SrvDaemon
    File “usr/lib64/python2.4/site-packages/xen/xend/server/SrvDaemon.py”, line 26, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/server/relocate.py”, line 28, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py”, line 36, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/XendCheckpoint.py”, line 20, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/image.py”, line 38, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/xenstore/xstransact.py”, line 8, in ?
    File “usr/lib64/python2.4/site-packages/xen/xend/xenstore/xsutil.py”, line 8, in ?
    ImportError: /usr/lib64/python2.4/site-packages/xen/lowlevel/xs.so: undefined symbol: xs_set_target
    [root@localhost bin]# xm list
    Traceback (most recent call last):
    File “/usr/sbin/xm”, line 5, in ?
    from xen.xm import main
    File “usr/lib64/python2.4/site-packages/xen/xm/main.py”, line 54, in ?
    File “usr/lib64/python2.4/site-packages/xen/xm/console.py”, line 19, in ?
    ImportError: /usr/lib64/python2.4/site-packages/xen/lowlevel/xs.so: undefined symbol: xs_set_target
    [root@localhost bin]#

  191. @Lwang15
    一般来说这类问题都是 python, xen hypervisor, xen tools, virt-manager, libvirt 之间的版本匹配问题。

  192. make[3]: *** [check-build] Error 1
    make[3]: Leaving directory `/home/soft/xen-4.1.1/tools/check’
    make[2]: *** [subdir-install-check] Error 2
    make[2]: Leaving directory `/home/soft/xen-4.1.1/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/home/soft/xen-4.1.1/tools’
    make: *** [install-tools] Error 2
    纳闷。。。

  193. 用的2.6.38的kernel,patch是http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.38-2.tar.bz2,报错
    CC arch/x86/kernel/cpu/amd.o
    arch/x86/kernel/cpu/amd.c: In function 慽nit_amd�:
    arch/x86/kernel/cpu/amd.c:643:18: error: 慳md_size_cache� undeclared (first
    use in this function)
    arch/x86/kernel/cpu/amd.c:643:18: note: each undeclared identifier is
    reported only once for each function it appears in
    arch/x86/kernel/cpu/amd.c:627:1: warning: ISO C90 forbids mixed declarations
    and code
    arch/x86/kernel/cpu/amd.c:670:1: warning: ISO C90 forbids mixed declarations
    and code
    arch/x86/kernel/cpu/amd.c:673:1: error: extern declaration of
    慳md_erratum_400� follows declaration with no linkage
    arch/x86/kernel/cpu/amd.c:670:11: note: previous definition of
    慳md_erratum_400� was here
    arch/x86/kernel/cpu/amd.c:677:1: error: extern declaration of
    慳md_erratum_383� follows declaration with no linkage
    arch/x86/kernel/cpu/amd.c:675:11: note: previous definition of
    慳md_erratum_383� was here
    arch/x86/kernel/cpu/amd.c:721:1: error: non-static declaration of
    慶pu_has_amd_erratum� follows static declaration
    arch/x86/kernel/cpu/amd.c:679:6: note: previous definition of
    慶pu_has_amd_erratum� was here
    arch/x86/kernel/cpu/amd.c:721:1: error: expected declaration or statement at
    end of input
    arch/x86/kernel/cpu/amd.c: At top level:
    arch/x86/kernel/cpu/amd.c:446:23: warning: 慽nit_amd� defined but not used
    make[3]: *** [arch/x86/kernel/cpu/amd.o] Error 1
    make[2]: *** [arch/x86/kernel/cpu] Error 2
    make[1]: *** [arch/x86/kernel] Error 2
    make: *** [arch/x86] Error 2

  194. ACPI ASL compiler (iasl) is needed
    Download and install Intel ACPI CA from
    http://acpica.org/downloads/

    make[8]: *** [iasl] Error 1
    make[8]: Leaving directory `/test/xen-4.0.1/tools/firmware/hvmloader/acpi’
    make[7]: *** [subdir-all-acpi] Error 2
    make[7]: Leaving directory `/test/xen-4.0.1/tools/firmware/hvmloader’
    make[6]: *** [subdirs-all] Error 2
    make[6]: Leaving directory `/test/xen-4.0.1/tools/firmware/hvmloader’
    make[5]: *** [subdir-all-hvmloader] Error 2
    make[5]: Leaving directory `/test/xen-4.0.1/tools/firmware’
    make[4]: *** [subdirs-all] Error 2
    make[4]: Leaving directory `/test/xen-4.0.1/tools/firmware’
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/test/xen-4.0.1/tools/firmware’
    make[2]: *** [subdir-install-firmware] Error 2
    make[2]: Leaving directory `/test/xen-4.0.1/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/test/xen-4.0.1/tools’
    make: *** [install-tools] Error 2

    你好,我在安装时出现这些错误,请问是怎么回事,我安装了install Intel ACPI CA from
    的啊,谢谢!

  195. @vpsee

    我也遇到了类似193楼的问题,是怎么回事呢?

  196. 求助vpsee !!
    我用的跟网页中的xen和kernel版本都相同,但是出现下面错误,不知如何解决
    driver/xen/core/evtchn.c:In function ‘xen_init_IRQ’:
    driver/xen/core/evtchn.c:1797:error:size of array ‘type name’ is negative

  197. @vpsee
    小弟参考http://www.vpsee.com/2010/04/install-xen-on-centos-from-source/#comments安装xen
    我用的跟网页中的xen和kernel版本都相同,但是在编译内核时出现下面错误,不知如何解决
    driver/xen/core/evtchn.c:In function ‘xen_init_IRQ’:
    driver/xen/core/evtchn.c:1797:error:size of array ‘type name’ is negative
    期盼高手给我指点,谢谢

  198. 我也遇到相同的问题:
    drivers/xen/core/evtchn.c: In function ‘xen_init_IRQ’
    drivers/xen/core/evtchn.c:1797 error size of array ‘type name’ is negative
    make[3]: *** [drives/xen/core/evtchn.o] Error 1

  199. 您好,按照您的步骤安装到# /sbin/chkconfig –add xend
    提示在 xend 服务中读取信息时出错:没有那个文件或目录是怎么回事啊?

  200. @qiffang
    可能你安装 xen 不成功,所以就没有 xend,也就不能添加 xend 服务到系统启动配置中。确定 /etc/init.d 里面有 xend 和 xenddomains.

  201. 不好意思哈,最后那两句不是的
    [root@qff xen-4.1.0]# make xen,make tools
    make: *** 没有规则可以创建目标“xen,make”。 停止。
    不是的,前面的错误是怎么回事呢?

  202. vpsee大牛,我是centos6下,源码编译安装xen4.1.2,然后升级内核为3.0.1,在升级内核时候提示
    ERROR: modinfo: could not find module i2c_core
    ERROR: modinfo: could not find module soundcore
    ,然后我忽略了,重启后发现xen没有启动,手动执行/etc/init.d/xencommons start出现这个错误:
    grep: /proc/xen/capabilities: No such file or directory
    请问这是什么情况,我google了,未果。求助。

  203. 已经解决了,是我menu.lst没有写对。
    再向vpsee大牛请教一下,xen虚拟机能可做热备份吗?

  204. 高手,求救,我安装了一天的XEN,怎么每次都是这个地方有问题呢?最后那几个是什么错误呢?怎么安装不上XEN啊?
    [root@qff xen-4.1.0]# make install-xen install -tools
    make -C xen install
    make[1]: Entering directory `/usr/Xen/xen-4.1.0/xen’
    make -f Rules.mk _install

    make[4]: Leaving directory `/usr/Xen/xen-4.1.0/tools/include/xen-foreign’
    touch xen/.dir
    make[3]: touch: open: xen/.dir: 没有那个文件或目录
    make[3]: Leaving directory `/usr/Xen/xen-4.1.0/tools/include’
    make[2]: *** [subdir-install-include] 错误 1
    make[2]: Leaving directory `/usr/Xen/xen-4.1.0/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/usr/Xen/xen-4.1.0/tools’
    make: *** [install-tools] 错误 2

  205. @qiffang
    应该是 $ make xen; make tools,中间是“分号”,不是“逗号”,意思是先编译 xen 然后编译 tools。或者一个一个编译
    $ make xen
    $ make tools
    或者一起编译
    $ make xen tools

  206. 高手,求救额,总是出错是怎么回事啊?
    [root@qff xen-4.1.0]# make tools
    make -C tools install
    make[1]: Entering directory `/usr/xen/xen-4.1.0/tools’
    make[2]: Entering directory `/usr/xen/xen-4.1.0/tools’
    make -C check install
    make[3]: Entering directory `/usr/xen/xen-4.1.0/tools/check’
    PYTHON=python LIBXENAPI_BINDINGS=n ACM_SECURITY=n ./chk build
    Xen CHECK-BUILD 2011年 11月 25日 星期五 15:12:32 CST
    Checking check_crypto_lib: OK
    Checking check_curl: unused, OK
    Checking check_openssl_devel: OK
    Checking check_python: OK
    Checking check_python_devel: OK
    Checking check_uuid_devel:
    *** check_uuid_devel FAILED: missing uuid headers (package uuid-dev)
    Checking check_x11_devel: OK
    Checking check_xgettext: OK
    Checking check_xml2: unused, OK
    Checking check_zlib_devel: OK
    Checking check_zlib_lib: OK
    make[3]: *** [check-build] 错误 1
    make[3]: Leaving directory `/usr/xen/xen-4.1.0/tools/check’
    make[2]: *** [subdir-install-check] 错误 2
    make[2]: Leaving directory `/usr/xen/xen-4.1.0/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/usr/xen/xen-4.1.0/tools’
    make: *** [install-tools] 错误 2

  207. @qiffang
    缺少 uuid-dev 包,需要安装这个包。在 ubuntu 下 apt-get install uuid-dev;在 centos 下 yum install libuuid-devel

  208. 高手,我用的是centos6的系统,请问安装xen最简单的办法是什么啊?能不能详细说明啊?拜托了,非常谢谢

  209. @qiffang
    redhat 从 rhel6/centos6 开始不支持 xen,所以最简单办法是用 centos 5,并采用二进制安装 xen

  210. 你好,我用你的方法安装,并且yum install libuuid-devel安装了包,可是在
    make install-xen install-tools install-stubdom 出现了以下这个错误:
    ===========================================================================
    make[3]: *** [all] 错误 1
    make[3]: Leaving directory `/usr/xen-4.1.0/tools/firmware’
    make[2]: *** [subdir-install-firmware] 错误 2
    make[2]: Leaving directory `/usr/xen-4.1.0/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/usr/xen-4.1.0/tools’
    make: *** [install-tools] 错误 2

    我用的是centos 6.0,在更新了linux-3.0的内核后,启动不起来了,黑屏是怎么回事啊?

    是不是安装centos 5.0系统容易安装Xen?
    真是很感谢你!

  211. 你好,centos5.7的系统,装xen可以用:yum install kernel-xen xen来安装吗?centos5.7系统支持这样安装吗?

  212. @默, qiffang
    centos 5.4/5.5/5.6/5.7 都可以这样轻松安装。

  213. 你好,我用你的方法安装,并且yum install libuuid-devel安装了包,可是在
    make install-xen install-tools install-stubdom 出现了以下这个错误:
    ===========================================================================
    make[3]: *** [all] 错误 1
    make[3]: Leaving directory `/usr/xen-4.1.0/tools/firmware’
    make[2]: *** [subdir-install-firmware] 错误 2
    make[2]: Leaving directory `/usr/xen-4.1.0/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/usr/xen-4.1.0/tools’
    make: *** [install-tools] 错误 2

    我用的是centos 6.0,在上面的错误下,我忽略了错误安装了,可是在更新了linux-3.0的内核后,启动不起来了,黑屏是怎么回事啊?难道上面的错误不能忽略吗?

  214. 你好,请教下,我用的是centos 6.0的系统,可以按照你上面的步骤安装吗?

  215. 你好,我在make linux内核2.6.32时候出现以下错误提示:
    driver/xen/core/evtchn.c:In function ‘xen_init_IRQ’:
    driver/xen/core/evtchn.c:1797:error:size of array ‘type name’ is negative

    请问什么原因啊?应该如何解决?十分感谢!!!

  216. fedora 16 gurb

    我现在依旧用的是network manager
    能不能解释一下 网络配置?
    还有这个问题 是什么原因?

    google 之后很多不同的说法。

    Unable to open a connection to the Xen hypervisor/daemon.

    Verify that:
    – A Xen host kernel was booted
    – The Xen service has been started

    unable to connect to ‘localhost:8000’: Connection refused

    Traceback (most recent call last):
    File “/usr/share/virt-manager/virtManager/connection.py”, line 1146, in _open_thread
    self.vmm = self._try_open()
    File “/usr/share/virt-manager/virtManager/connection.py”, line 1130, in _try_open
    flags)
    File “/usr/lib/python2.7/site-packages/libvirt.py”, line 102, in openAuth
    if ret is None:raise libvirtError(‘virConnectOpenAuth() failed’)
    libvirtError: unable to connect to ‘localhost:8000’: Connection refused

  217. 已经打开了 http xend-port 8000之前的注释也去掉了

  218. @嘉谟
    安装 xen 完毕不代表 xen 就在运行,检查一下是否正在运行在 xen 内核,xend 是否正在正常运行。再看看防火墙和 selinux 是否关闭的。

  219. @vpsee

    恩 谢谢。 我又service iptables stop 才知道防火墙实际上是开启的。
    之前重启时没有用 chkconfig iptables off 这个命令。

    恩 如果在遇到问题,解决不了 再来请教。

  220. ===========================
    Require dev86 rpm or bin86 & bcc debs version >= 0.16.14 to build firmware!
    (visit http://www.debath.co.uk/dev86/ for more information)
    ===========================
    make[3]: *** [all] Error 1
    make[3]: Leaving directory `/root/xen-4.1.2/tools/firmware’
    make[2]: *** [subdir-install-firmware] Error 2
    make[2]: Leaving directory `/root/xen-4.1.2/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/root/xen-4.1.2/tools’
    make: *** [install-tools] Error 2

    make xen tools stubdom和make xen、make tools的错误。要怎么解决了?

  221. @vpsee
    用yum找不到安装包
    我的是centos6.2的系统
    make[3]: *** [check-build] 错误 1
    make[3]: Leaving directory `/root/xen-4.1.2/tools/check’
    make[2]: *** [subdir-install-check] 错误 2
    make[2]: Leaving directory `/root/xen-4.1.2/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/root/xen-4.1.2/tools’
    make: *** [install-tools] 错误 2
    按照上面的方法make时出现问题
    这个怎么办?
    求救啊
    忙了一个晚上了

  222. @breakwind, Anonymous
    Require dev86 rpm or bin86 & bcc debs version >= 0.16.14 to build firmware!
    从上面的提示来看需要安装 dev86 软件包,yum install dev86

  223. 请问,编译xen内核时,能不能选择支持raid驱动,是哪个选项?
    现在因为没有驱动机器起不来,raid的型号时rocketraid 2640

  224. 我试过在其他机器上装好xen0然后在他的内核下编译驱动,但是报错说驱动不能在xen环境下编译

  225. @wenderful
    xen 内核可以支持 raid 驱动,驱动是 dom0 做的事情,和 xen hypervisor 关系不大,所以只要 linux kernel 支持你的 raid,xen/dom0 就支持你的 raid.

  226. @vpsee
    老大,貌似kernel 2.6.39及以后内核就不用打xen补丁了!
    直接make meunconfig 配置内核选项后 编译安装就行了是吗 ?

  227. 接上问,嘿嘿
    ———–
    还有,xen patch都只有这个 http://gentoo-xen-kernel.googlecode.com/files/能下么?(奇怪xen官方站居然没patch下)

    下载的时候得是需要与系统kernel版本号全匹配吗(主版-次版-末版号) ,还是主-次就可以了 ?

    祝大大新年happy,工作顺利 ~

  228. hi ,vpsee

    我编译安装xen4.1.2 ,顺序是:源码安装xen—>编译安装kernel 3.2.1,改grub.conf
    重启进入xen ,运行xm list 正常! 但是中途我没安装libvirt,virt-install无法使用!
    我就立即yum安装libvirt,启动服务,再输入virt-install ,提示:ERROR Host does not support virtualization type ‘xen’ !一直卡在这里(3天了)

  229. —-接上文

    我看你这篇编译安装文档也没提到libvirt,请问如果要用 virt-install,源码安装xen应该怎么操作(libvirt)呢 ?
    ERROR Host does not support virtualization type ‘xen’

  230. @凯文
    这个一般由各个操作系统发行版负责 dom0 kernel 部分,xen 官方只提供 xen hypervisor 和 xen tools,不过 Xen 官方 Wiki:http://wiki.xen.org/xenwiki/XenDom0Kernels 有很多介绍。

  231. @天天
    因为你源码编译安装的 xen 和 yum 安装的 libvirt/virt-install 版本不匹配。

  232. 请问我在编译 iasl 时会提示这样的错误信息是何原因,如何解决?

    cc1: error: unrecognized command line option “-Waddress”
    cc1: error: unrecognized command line option “-Wempty-body”
    cc1: error: unrecognized command line option “-Wlogical-op”
    cc1: error: unrecognized command line option “-Wmissing-parameter-type”
    cc1: error: unrecognized command line option “-Wold-style-declaration”
    cc1: error: unrecognized command line option “-Wtype-limits”
    make: *** [adfile.o] Error 1

    因网上找不到类似错误的解决办法,不知如何处理,故请教,谢谢。

  233. @sibuna
    这些 options 是新版 gcc 编译器才支持的,你需要升级 gcc 或者在 Makefile 文件中注释掉这些 options.

  234. KVM 能否限制cpu 比如 cpu 频率 使用百分比? 谢谢

  235. 如果KVM,能够做到限制每一个虚拟机使用物理机器的cpu百分比或者是cpu 频率,那就完美了,我找了很久,没有发现这项功能。

  236. @wopub
    有多种方法。kvm 运行实际就是一个 linux 进程,可以通过 cpulimit 等工具限制进程 cpu 达到限制 kvm 虚拟机使用 cpu 的目的。更好的办法是用 cgroup,使用 cgroup 后可以用 virsh schedinfo vm01 和 virsh schedinfo –set cpu_shares=500 vm01 来查看 vm01 使用 cpu 情况和限制 vm01 使用 cpu.

  237. vpsee 大哥 有没有cgroups 方面资料,小弟研究下。谢谢好大哥

  238. @vpsee
    xen中有什么方法可以限制磁盘I/O吗?经常有用户运行高磁盘I/O的程序,导致其它VM效率低。

  239. vpsee 大哥,我用您的方法限制cpu,提示没有错误如下:
    [root@localhost ~]# virsh schedinfo -set cpu_shares=512 test-win
    error: failed to get domain ‘-set’
    error: Domain not found: no domain with matching name ‘-set’

  240. @wopub
    –set 是2个英文破折号 –,不知道怎么回事在 wordpress 显示只有1个 –

  241. 你好,才开始接触xen,看了你的很多帖子。今天尝试在DomU下编译xen(原机器上已装有xen,且Dom0为fedora16),最开始尝试的是xen4.1.2,然后有尝试了4.0.0。都是报的以下错误。不知如何解决。
    ============================================
    Install prefix /usr
    BIOS directory /usr/share/qemu
    binary directory /usr/bin
    Manual directory /usr/share/man
    ELF interp prefix /usr/gnemul/qemu-%M
    Source path /home/xen-4.0.0/tools/ioemu-dir
    C compiler gcc
    Host C compiler gcc
    ARCH_CFLAGS -m64
    make make
    install install
    host CPU x86_64
    host big endian no
    target list i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user
    gprof enabled no
    sparse enabled no
    profiler no
    static build no
    -Werror enabled no
    SDL support no
    OpenGL support
    curses support no
    mingw32 support no
    Audio drivers oss
    Extra audio cards ac97 es1370 sb16
    Mixer emulation no
    VNC TLS support no
    kqemu support yes
    brlapi support no
    Documentation no
    NPTL support yes
    vde support no
    AIO support yes
    Install blobs yes
    KVM support no – (linux/kvm.h: No such file or directory, #error Invalid KVM version, #error Missing KVM capability KVM_CAP_USER_MEMORY, #error Missing KVM capability KVM_CAP_SET_TSS_ADDR, #error Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS)
    fdt support no
    ==================================================================
    The error log from compiling the libSDL test is:
    /tmp/qemu-conf-24369-27528-9419.c:1:17: 错误:SDL.h:没有那个文件或目录
    /tmp/qemu-conf-24369-27528-9419.c: In function ‘main’:
    /tmp/qemu-conf-24369-27528-9419.c:3: 错误:‘SDL_INIT_VIDEO’ 未声明 (在此函数内第一次使用)
    /tmp/qemu-conf-24369-27528-9419.c:3: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
    /tmp/qemu-conf-24369-27528-9419.c:3: 错误:所在的函数内只报告一次。)
    qemu successfuly configured for Xen qemu-dm build
    make[1]: Leaving directory `/home/xen-4.0.0/tools’
    make -C tools install
    make[1]: Entering directory `/home/xen-4.0.0/tools’
    make[2]: Entering directory `/home/xen-4.0.0/tools’
    make -C check install
    make[3]: Entering directory `/home/xen-4.0.0/tools/check’
    PYTHON=python LIBXENAPI_BINDINGS=n ACM_SECURITY=n ./chk build
    Xen CHECK-BUILD 2012年 02月 23日 星期四 04:39:47 CST
    Checking check_crypto_lib: OK
    Checking check_curl: unused, OK
    Checking check_openssl_devel:
    *** check_openssl_devel FAILED: missing openssl headers
    Checking check_python: OK
    Checking check_python_devel: OK
    Checking check_uuid_devel:
    *** check_uuid_devel FAILED: missing uuid headers (package uuid-dev)
    Checking check_x11_devel: OK
    Checking check_xgettext: OK
    Checking check_xml2: unused, OK
    Checking check_zlib_devel: OK
    Checking check_zlib_lib: OK
    make[3]: *** [check-build] 错误 1
    make[3]: Leaving directory `/home/xen-4.0.0/tools/check’
    make[2]: *** [subdir-install-check] 错误 2
    make[2]: Leaving directory `/home/xen-4.0.0/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/home/xen-4.0.0/tools’
    make: *** [install-tools] 错误 2
    You have new mail in /var/spool/mail/root

  242. @wang_nets
    错误提示的很清除,缺少 openssl 开发库包(openssl-devel)和 uuid 开发库包(uuid-devel libuuid-devel),yum install 这些包就可以了(注意包的名字)。
    *** check_openssl_devel FAILED: missing openssl headers
    *** check_uuid_devel FAILED: missing uuid headers (package uuid-dev)

  243. @vpsee,谢谢。首先,yum install openssl-devel uuid-devel libuuid-devel uuid-dev后,没有发现后面的三个包。之后编译过程中报错:
    ================================================
    The error log from compiling the libSDL test is:
    /tmp/qemu-conf-11440-30259-4701.c:1:17: 错误:SDL.h:没有那个文件或目录
    /tmp/qemu-conf-11440-30259-4701.c: In function ‘main’:
    /tmp/qemu-conf-11440-30259-4701.c:3: 错误:‘SDL_INIT_VIDEO’ 未声明 (在此函数内第一次使用)
    /tmp/qemu-conf-11440-30259-4701.c:3: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
    /tmp/qemu-conf-11440-30259-4701.c:3: 错误:所在的函数内只报告一次。)
    qemu successfuly configured for Xen qemu-dm build
    make -C ioemu-dir install
    make[3]: Entering directory `/home/xen-4.0.0/tools/ioemu-qemu-xen’
    xen-hooks.mak:56: === pciutils-dev package not found – missing /usr/include/pci
    xen-hooks.mak:57: === PCI passthrough capability has been disabled
    ===============================================================
    yum install pciutils-dev,还是没有发现pciutils-dev这个包,请问下还如何处理,不胜感激….(yum -y update后情况还没有改变)

  244. 尝试在本地安装,RPM包下好了pciutils-dev包安装没问题,uuid-devel安装过程中提示缺少依赖项
    ============================================================
    uuid-devel-1.6.1-3.el5.kb.x86_64 from /uuid-devel-1.6.1-3.el5.kb.x86_64_(1) has depsolving problems
    –> Missing Dependency: libossp-uuid.so.16()(64bit) is needed by package uuid-devel-1.6.1-3.el5.kb.x86_64 (/uuid-devel-1.6.1-3.el5.kb.x86_64_(1))
    uuid-devel-1.6.1-3.el5.kb.x86_64 from /uuid-devel-1.6.1-3.el5.kb.x86_64_(1) has depsolving problems
    –> Missing Dependency: uuid = 1.6.1-3.el5.kb is needed by package uuid-devel-1.6.1-3.el5.kb.x86_64 (/uuid-devel-1.6.1-3.el5.kb.x86_64_(1))
    Error: Missing Dependency: uuid = 1.6.1-3.el5.kb is needed by package uuid-devel-1.6.1-3.el5.kb.x86_64 (/uuid-devel-1.6.1-3.el5.kb.x86_64_(1))
    Error: Missing Dependency: libossp-uuid.so.16()(64bit) is needed by package uuid-devel-1.6.1-3.el5.kb.x86_64 (/uuid-devel-1.6.1-3.el5.kb.x86_64_(1))
    ==============================================================
    根据所给提示一查属于glibc-2.5-65.el5_7.3.x86_64里面的,可是这个我在CentOS里面装过了,重新安装提示安装的是最新版本的@_@,不好意思麻烦了

  245. 经过一下午的努力,就剩一个错误在make stubdom的时候会报错,以下错误。看见你上面的回复,make stubdom这一步可有可无么?
    ==========================================================
    make[5]: *** [standards.info] 错误 1
    make[5]: Leaving directory `/home/xen-4.0.0/stubdom/newlib-x86_64/etc’
    make[4]: *** [info] 错误 1
    make[4]: Leaving directory `/home/xen-4.0.0/stubdom/newlib-x86_64/etc’
    make[3]: *** [all-etc] 错误 2
    make[3]: Leaving directory `/home/xen-4.0.0/stubdom/newlib-x86_64′
    make[2]: *** [all] 错误 2
    make[2]: Leaving directory `/home/xen-4.0.0/stubdom/newlib-x86_64′
    make[1]: *** [cross-root-x86_64/x86_64-xen-elf/lib/libc.a] 错误 2
    make[1]: Leaving directory `/home/xen-4.0.0/stubdom’
    make: *** [install-stubdom] 错误 2

  246. 自己改好了,不好意思,打扰了….

  247. 請問我yum install kernel-xen xen
    並且之後我都設定完成了
    但是我原本安裝前egrep ‘(vmx|svm)’ –color=always /proc/cpuinfo有資訊
    但是換了xen的新kernel之後下達egrep ‘(vmx|svm)’ –color=always /proc/cpuinfo
    這個指令卻沒有資訊出來是為什麼??
    我確定我安裝kernel-xen之前cpu之源vmx的

  248. @cinmex
    对的,因为你现在用的是基于 Xen 的 Linux 内核,Xen 不提供 vmx|svm 标识主要为了防止 hijacking.
    参考 http://www.linux-kvm.org/page/FAQ

    You’ll never see (vmx|svm) in /proc/cpuinfo if you’re currently running in in a dom0 or domU.
    The Xen hypervisor suppresses these flags in order to prevent hijacking.

  249. 按照@vpsee的方法装的,其中解决了一些问题。但是使用virt-manager安装pv dom时出现。
    ‘libvirt.libvirtError virDomainCreateLinux() failed POST操作失败: (xend.err ‘Device 0 (vif) could not be connected. Hotplug scripts not working.
    安装domU的时候碰到了这个问题,ifconfig发现只有eth0,peth0,lo。
    vif0.0,xenbr0,virbr0都没有。
    查看了xend-config.sxp 和network-bridge,貌似都没啥问题
    lsmod | grep net
    没发现任何模块
    看到网上有说法说手动加载模块 netbk ,netloop
    但是系统里没有netbk,netloop
    问下@vpsee这应该是哪出了问题

  250. 在其他装好xen的机器上复制了一个domU过来,使用xm create 启动,也提示Error:Device 0(vif)could not be connected.hotplug scripts is not working.

  251. @wnlo_apple
    看看日志文件里有些什么异常的
    /var/log/xen/xen-hotplug.log
    /var/log/xen/xend.log

  252. @vpsee
    今天重新make xen&&install-xen了一下
    启动拷贝过来的domU,不再提示
    Error:Device 0(vif)could not be connected.hotplug scripts is not working.
    但是仍然启动不起来
    查看了一下
    /var/log/xen/xen-hotplug.log
    没什么信息,就是nothing to flush.
    /var/log/xen/xend.log提示
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices vif2.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices vif.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices vscsi.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices vbd.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices ioports.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices irq.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices vkbd.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices vfb.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices console.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:144) Waiting for 0.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices pci.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:139) Waiting for devices tap2.
    [2012-03-21 16:16:17 7370] DEBUG (DevController:144) Waiting for 51712.
    [2012-03-21 16:16:18 7370] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/51712/hotplug-status.
    [2012-03-21 16:16:18 7370] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/1/51712/hotplug-status.
    [2012-03-21 16:16:18 7370] DEBUG (DevController:642) hotplugStatusCallback 1.
    [2012-03-21 16:16:18 7370] DEBUG (DevController:139) Waiting for devices tap.
    [2012-03-21 16:16:18 7370] DEBUG (DevController:139) Waiting for devices vusb.
    [2012-03-21 16:16:18 7370] DEBUG (DevController:139) Waiting for devices vtpm.
    ……
    DOM0编译的问题?

  253. Vpsee 大大 , 最近装xen 4.1.2 (CentOS 6.0) ,在用virt-manager连接xen时,总是出现如下错误。。。已经修改过xend.config了,(xend-http-server yes)
    (xend-port 8000)
    (xend-address localhost)解除注释。。。

    Unable to open connection to hypervisor URI ‘xen:///’:
    no connection driver available for No connection for URI xen:///
    Traceback (most recent call last):
    File “/usr/share/virt-manager/virtManager/connection.py”, line 992, in _try_open
    None], flags)
    File “/usr/lib64/python2.6/site-packages/libvirt.py”, line 102, in openAuth
    if ret is None:raise libvirtError(‘virConnectOpenAuth() failed’)
    libvirtError: no connection driver available for No connection for URI xen:///

  254. 你好 我是在centos5.5上安装xen4.0.1
    根据您的文档 在执行
    make xen tools stubdom
    时遇到以下问题
    /root/xen/xen-4.0.1/stubdom/ioemu
    /bin/sh:line 6:32644 Segmentation fault rm -f “$f”
    make[1]:*** [ioemu/linkfarm.stamp] Error 139
    make[1]: Leaving directory `/root/xen/xen-4.0.1/stubdom’
    make:*** [install-stubdom] Error 2
    请问一下这些到底是什么意思呢 怎么解决

  255. vpsee,您好。
    我是在redhat6下面安装xen-4.1.2.
    在$ make xen tools stubdom 和
    # make install-xen install-tools install-stubdom
    都有同样的错误:
    make[3]: *** [check-build] 错误 1
    make[3]: Leaving directory `/root/src/xen-4.1.2/tools/check’
    make[2]: *** [subdir-install-check] 错误 2
    make[2]: Leaving directory `/root/src/xen-4.1.2/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]: Leaving directory `/root/src/xen-4.1.2/tools’
    make: *** [install-tools] 错误 2

    看了有些留言,您说不加make stubdom 我也试过,还是提示这个错误。万般无奈只能向您求救了。

  256. 谢谢。vpsee,上面的问题。我又仔细的研究了一下,搞定了。不好意思打扰了啊。

  257. @vpsee想请教一下如果是实际的操作上,是使用xen hypervisor好,稳定还是用xcp。xcp可以使用Xapi感覺會比較方便 ,但是曾经试过用xcp無法鏈接iscsi服務器又让我对xcp的信心不足. 请问vpsee有没有这方面的经验

  258. 想知道XCP跟只装XEN hypervisor那个更适合实际操作

  259. @Tony
    这两个不同,用的话都很稳定,XCP 基于 Xen,XCP 对应的应该是 XenServer, vSphere, HyperV 等。比如 OpenStack 之类的云计算产品,只支持 XCP/XenServer,不支持 Xen.

  260. 那么在Centos5.8里面在make menuconfig 之后的make时出现

    drivers/xen/blktap2/built-in.o:/root/kernel/linux-2.6.38.2/drivers/xen/blktap2/sysfs.c:300: first defined here
    ld: Warning: size of symbol `blktap_sysfs_create’ changed from 315 in drivers/xen/blktap2/built-in.o to 214 in drivers/xen/blktap2-new/built-in.o
    make[2]: *** [drivers/xen/built-in.o] Error 1
    make[1]: *** [drivers/xen] Error 2
    make: *** [drivers] Error 2
    怎么回事?

  261. 然后改成 2.6.32.4也不行

    arch/x86/kernel/vsyscall_64-xen.c:78: error: conflicting types for ‘update_vsyscall’
    include/linux/clocksource.h:283: error: previous declaration of ‘update_vsyscall’ was here

  262. LD drivers/xen/console/built-in.o
    CC drivers/xen/core/evtchn.o
    drivers/xen/core/evtchn.c: In function ‘arch_init_chip_data’:
    drivers/xen/core/evtchn.c:1646: error: ‘struct irq_desc’ has no member named ‘affinity’
    drivers/xen/core/evtchn.c: In function ‘arch_probe_nr_irqs’:
    drivers/xen/core/evtchn.c:1672: error: ‘nr_ioapics’ undeclared (first use in this function)
    drivers/xen/core/evtchn.c:1672: error: (Each undeclared identifier is reported only once
    drivers/xen/core/evtchn.c:1672: error: for each function it appears in.)
    drivers/xen/core/evtchn.c:1673: error: implicit declaration of function ‘io_apic_get_redir_entries’
    make[3]: *** [drivers/xen/core/evtchn.o] Error 1
    make[2]: *** [drivers/xen/core] Error 2
    make[1]: *** [drivers/xen] Error 2
    make: *** [drivers] Error 2

    I got this error while running “make”
    please help me
    very thanks!!!

  263. 想请问,这是为什么?
    [root@localhost linux-2.6.31.8]# make
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    CALL scripts/checksyscalls.sh
    CHK include/linux/compile.h
    CC drivers/xen/core/evtchn.o
    drivers/xen/core/evtchn.c: In function ‘xen_init_IRQ’:
    drivers/xen/core/evtchn.c:1797: error: size of array ‘type name’ is negative
    make[3]: *** [drivers/xen/core/evtchn.o] Error 1
    make[2]: *** [drivers/xen/core] Error 2
    make[1]: *** [drivers/xen] Error 2
    make: *** [drivers] Error 2
    You have new mail in /var/spool/mail/root

  264. 大神,请问下我用32bit的Fedora 16做dom0,内核是用的是3.3.2,xen用的是4.1.2,在配置内核的时候默认启动了PAE,但是为什么在改完grub之后重启,会发现先是花屏然后显示系统出现错误。这是内核配置的问题么?

  265. 您好,我遇到如下错误,是缺少什么安装包吗??
    @wang_nets你是如何解决到??
    make[5]: Entering directory `/home/fy/xen-4.1.2/stubdom/newlib-x86_64/etc’
    /home/fy/xen-4.1.2/stubdom/newlib-1.16.0/missing makeinfo –split-size=5000000 –split-size=5000000 –no-split -I../../newlib-1.16.0/etc -o standards.info ../../newlib-1.16.0/etc/standards.texi
    WARNING: `makeinfo’ is missing on your system. You should only need it if
    you modified a `.texi’ or `.texinfo’ file, or any other file
    indirectly affecting the aspect of the manual. The spurious
    call might also be the consequence of using a buggy `make’ (AIX,
    DU, IRIX). You might want to install the `Texinfo’ package or
    the `GNU make’ package. Grab either from any GNU archive site.
    make[5]: *** [standards.info] 错误 1
    make[5]: Leaving directory `/home/fy/xen-4.1.2/stubdom/newlib-x86_64/etc’
    make[4]: *** [info] 错误 1
    make[4]: Leaving directory `/home/fy/xen-4.1.2/stubdom/newlib-x86_64/etc’
    make[3]: *** [all-etc] 错误 2
    make[3]: Leaving directory `/home/fy/xen-4.1.2/stubdom/newlib-x86_64′
    make[2]: *** [all] 错误 2
    make[2]: Leaving directory `/home/fy/xen-4.1.2/stubdom/newlib-x86_64′
    make[1]: *** [cross-root-x86_64/x86_64-xen-elf/lib/libc.a] 错误 2
    make[1]: Leaving directory `/home/fy/xen-4.1.2/stubdom’
    make: *** [install-stubdom] 错误 2

  266. 刚看到,是缺少texinfo!

  267. @wang_nets
    一般启动问题都是内核配置问题。

  268. @vpsee大侠,我是在win7系统的vmware虚拟机里安装的centos6,在make的时候出现了这样的提示,请问是为什么?
    [root@localhost linux-2.6.31.8]# make
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    CALL scripts/checksyscalls.sh
    CHK include/linux/compile.h
    CC drivers/xen/core/evtchn.o
    drivers/xen/core/evtchn.c: In function ‘xen_init_IRQ’:
    drivers/xen/core/evtchn.c:1797: error: size of array ‘type name’ is negative
    make[3]: *** [drivers/xen/core/evtchn.o] Error 1
    make[2]: *** [drivers/xen/core] Error 2
    make[1]: *** [drivers/xen] Error 2
    make: *** [drivers] Error 2
    You have new mail in /var/spool/mail/root

  269. @vpsee大神,我之前64位没有出现这个情况,32位内核我只注意了PAE选项被选上了,还需要选择什么么?还有一个问题我用虚拟机管理器安装PV,但是没有看到安装界面同时PV的CPU使用率100%,xend.log中有这些信息。

    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vif.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:144) Waiting for 0.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vif/2/0/hotplug-status.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:642) hotplugStatusCallback 1.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vkbd.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices ioports.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices tap.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vif2.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices console.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:144) Waiting for 0.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vscsi.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vbd.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:144) Waiting for 51712.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:628) hotplugStatusCallback /local/domain/0/backend/vbd/2/51712/hotplug-status.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:642) hotplugStatusCallback 1.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices irq.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vfb.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices pci.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vusb.
    [2012-06-07 22:20:57 2027] DEBUG (DevController:139) Waiting for devices vtpm.
    [2012-06-07 22:20:57 2027] INFO (XendDomain:1225) Domain Fedora16_PV (2) unpaused.
    不知道你是否遇到过这种情况,安装HVM时正常的。

  270. 你好,安装是出现:怎么解决
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:57: undefined reference to `__gmpz_sizeinbase’
    bn.o: In function `tpm_bn_import’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:62: undefined reference to `__gmpz_import’
    bn.o: In function `tpm_bn_export’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:67: undefined reference to `__gmpz_export’
    bn.o: In function `tpm_bn_init’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:22: undefined reference to `__gmpz_init’
    bn.o: In function `tpm_bn_init2′:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:27: undefined reference to `__gmpz_init2′
    bn.o: In function `tpm_bn_init_set’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:32: undefined reference to `__gmpz_init_set’
    bn.o: In function `tpm_bn_init_set_ui’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:37: undefined reference to `__gmpz_init_set_ui’
    bn.o: In function `tpm_bn_set_ui’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:42: undefined reference to `__gmpz_set_ui’
    bn.o: In function `tpm_bn_clear’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:47: undefined reference to `__gmpz_clear’
    bn.o: In function `tpm_bn_swap’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:52: undefined reference to `__gmpz_swap’
    bn.o: In function `tpm_bn_cmp’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:72: undefined reference to `__gmpz_cmp’
    bn.o: In function `tpm_bn_cmp_ui’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:77: undefined reference to `__gmpz_cmp_ui’
    bn.o: In function `tpm_bn_setbit’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:87: undefined reference to `__gmpz_setbit’
    bn.o: In function `tpm_bn_add’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:92: undefined reference to `__gmpz_add’
    bn.o: In function `tpm_bn_add_ui’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:97: undefined reference to `__gmpz_add_ui’
    bn.o: In function `tpm_bn_sub’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:102: undefined reference to `__gmpz_sub’
    bn.o: In function `tpm_bn_sub_ui’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:107: undefined reference to `__gmpz_sub_ui’
    bn.o: In function `tpm_bn_mul’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:112: undefined reference to `__gmpz_mul’
    bn.o: In function `tpm_bn_mod’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:117: undefined reference to `__gmpz_mod’
    bn.o: In function `tpm_bn_powm’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:122: undefined reference to `__gmpz_powm’
    bn.o: In function `tpm_bn_ui_pow_ui’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:127: undefined reference to `__gmpz_ui_pow_ui’
    bn.o: In function `tpm_bn_fdiv_q_2exp’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:132: undefined reference to `__gmpz_fdiv_q_2exp’
    bn.o: In function `tpm_bn_tdiv_q’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:137: undefined reference to `__gmpz_tdiv_q’
    bn.o: In function `tpm_bn_gcd’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:142: undefined reference to `__gmpz_gcd’
    bn.o: In function `tpm_bn_invert’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:147: undefined reference to `__gmpz_invert’
    bn.o: In function `tpm_bn_nextprime’:
    /root/xen-4.1.2/tools/vtpm/vtpm/tpmd/../crypto/bn.c:152: undefined reference to `__gmpz_nextprime’
    collect2: ld 返回 1
    make[5]: *** [tpmd] 错误 1
    make[5]:正在离开目录 `/root/xen-4.1.2/tools/vtpm/vtpm/tpmd’
    /bin/sh: 4: exit: Illegal number: -1
    make[4]: *** [all-recursive] 错误 2
    make[4]:正在离开目录 `/root/xen-4.1.2/tools/vtpm/vtpm’
    make[3]: *** [build_sub] 错误 2
    make[3]:正在离开目录 `/root/xen-4.1.2/tools/vtpm’
    make[2]: *** [subdir-install-vtpm] 错误 2
    make[2]:正在离开目录 `/root/xen-4.1.2/tools’
    make[1]: *** [subdirs-install] 错误 2
    make[1]:正在离开目录 `/root/xen-4.1.2/tools’
    make: *** [install-tools] 错误 2

  271. 大牛,我在xen4.1.2配置网桥,为什么默认的xenbr0或者tmpbridge之类自动开启呢?brctl show后只有virbr0.郁闷ing

  272. 是默认的xenbr0或者tmpbridge之类没有自动开启,上面的错了

  273. 您好,我在CentOS6.3下源码安装xen-4.1.2,一切正常,但是virt-install用不了。我看了网上的帖子后,说重新编译libvirt源码
    我编译好后(编译过程中未出现error),查看/usr/lib目录,存在有libvirt*等一系列文件,
    但是当我yum install virt-install时,默认yum到的事0.9版本的,总是有Processing Dependency: libvirt.so.0*******的文字,感觉我编译出来的文件貌似没有被找到,然后yum会自动下载一个libvirt

    由于下载的这个Libvirt不支持xen,所以virt-install一直用不了?

  274. 请问这个问题如何解决,我看了之前的对话,貌似有和我问题相同的,但是也没有具体的解决方案。
    我只是想安装Guest OS,之后可能就用不到了
    如果这个问题很难办,请问还有没有其他安装Guest OS的方法
    谢谢

  275. 用LINUX3.1.2+XEN4.1.1 安装成功,但是后来执行virt-install 安装虚拟机的时候出错
    提示ERROR Host does not support any virtualization options

  276. @franklin1990
    virt-install 依赖 libvirt,这可能是 libvirt 的一个 bug,检查 libvirt (0.9.8+) 的版本,升级到 0.9.8+ 或以上。或者你可以不用 virt-install 安装虚拟机。

  277. 博主,现在还回答问题吗?555555

  278. 大神,请问一下,我用centos6.4安装libvirt后,运行libvirtd出现

    [root@david libvirt-0.7.7]# libvirtd
    10:56:12.652: warning : qemudStartup:1150 : Unable to create cgroup for driver: No such device or address
    10:56:12.706: warning : lxcStartup:1748 : Unable to create cgroup for driver: No such device or address

    11:46:04.079: warning : qemudDispatchSignalEvent:385 : Shutting down on signal 2

    请问应该 怎么解决?

  279. @知秋一叶
    貌似没有找到 /dev/cgroup,试一下手动挂载,然后重启一下 libvirtd

    # mkdir /dev/cgroup
    # mount -t cgroup none /dev/cgroup -o cpu,memory,devices

  280. make[3]: *** [check-build] Error 1
    make[3]: Leaving directory `/home/a/Downloads/xen-4.0.1/tools/check’
    make[2]: *** [subdir-install-check] Error 2
    make[2]: Leaving directory `/home/a/Downloads/xen-4.0.1/tools’
    make[1]: *** [subdirs-install] Error 2
    make[1]: Leaving directory `/home/a/Downloads/xen-4.0.1/tools’
    make: *** [install-tools] Error 2
    这是什么问题啊?

  281. vpsee大大,安装你上面的过程我在centos6.5-2.6.32下面编译安装xen,过程都没有报错,但是一直没有出现xend,我猜应该是没有编译tools,但是具体应该怎么解决这个问题呢?谢谢!

  282. 您好,我按照您的配置 一直进不去启动项
    显示invalid magic number:1ff8
    Error13:Invalid or unsupported executable format

    centos的挂载格式也试过ext3和ext4但是一直卡在这一步进不去

发表评论