在Xenserver 6.5上使用Libvirt

4
我正在尝试在开源 Xenserver 6.5 上安装带有 Xen 驱动的 Libvirt。我发现 XenAPI 驱动缺少一些 API,例如“virConnectNumOfStoragePools”,这是我需要使用的。因此,我需要使用 libxl 或 xenlight 驱动程序来实现这一点。我参考了 libvirt 的 API 支持来做出这个决定(https://libvirt.org/hvsupport.html)。
我无法让 Xen 驱动程序与 Libvirt 配置。以下是详细信息:
我未能找到一个有用的存储库,以便我可以使用其中的 Libvirt 和 Xen 驱动程序。因此,我选择在 Xenserver 上自己编译 Libvirt。
我下载了 Xenserver SDK,并从以下链接安装了 libxenserver 库: http://xenserver.org/partners/developing-products-for-xenserver.html 之后,我下载了 libvirt-1.2.21,并运行了 autogen.sh,导致以下 configure 命令:
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-xenapi=/usr/local/lib --with-curl=yes --with-xen=/usr/local/lib --with-gnutls=yes --with-libxl=/usr/local/lib --no-create --no-recursion
配置脚本转储了以下数据及其他数据:
configure:       Xen: no 
configure:      QEMU: yes
configure:       UML: yes
configure:    OpenVZ: yes
configure:    VMware: yes
configure:      VBox: yes
configure:    XenAPI: yes
configure:  xenlight: no
configure:       LXC: no
configure:      PHYP: no
configure:       ESX: yes
configure:   Hyper-V: no
configure:        vz: no
configure:     Bhyve: no
configure:      Test: yes
configure:    Remote: yes
configure:   Network: yes
configure:  Libvirtd: yes
configure: Interface: no
configure:   macvtap: no
configure:  virtport: no

看起来 configure 脚本没有找到相关的 Xen 库和头文件。

安装后,virsh 报告如下:

Virsh command line tool of libvirt 1.2.21
See web site at http://libvirt.org/


Compiled with support for:
 Hypervisors: QEMU/KVM UML OpenVZ VMWare VirtualBox ESX XenAPI Test
 Networking: Remote Network Bridging Nwfilter
 Storage: Dir Filesystem SCSI Multipath iSCSI LVM
 Miscellaneous: Daemon SELinux Secrets Debug Modular

有用信息:

Xenserver的内核为:3.10.0+2

架构:x86_64

LSB版本:core-4.0-amd64:core-4.0-noarch

如果我缺少任何配置或相关库,请提供指示将非常有帮助。

谢谢!


Libvirt 能够与 XenAPI 协同工作,因为我能够使用 Virsh 来管理 Xenserver。然而,正如问题中提到的,XenAPI 缺乏一些我所需要的 API 支持。 - ZephyrPLUSPLUS
1个回答

1
尽管libvirt技术上有一个XenAPI驱动程序,但实际上它已经被废弃了。最初编写它的贡献者多年前离开了Citrix,而且没有人愿意接手继续开发。因此,很遗憾,解决您在libvirt的XenAPI impl中缺少功能的问题并没有好的答案。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接