OS X 上的 libvirt 和 VirtualBox

发布于 2024-12-13 02:19:57 字数 575 浏览 6 评论 0原文

我正在尝试通过 OS X (Lion) 上的 libvirt 访问 VirtualBox。我使用 Homebrew 安装了 libvirt 0.9.4。但是,libvirt 无法连接到 VirtualBox:

# virsh -c vbox:///session
error: internal error unable to initialize VirtualBox driver API
error: failed to connect to the hypervisor

在有关 Ubuntu 的类似 SO 问题中,答案是 Ubuntu libvirt 软件包不支持 VirtualBox。如何检查这是否是 Homebrew 软件包的问题,​​或者是否是其他问题?如果是同样的问题,如何重建具有 VirtualBox 支持的 Homebrew 软件包?


编辑:libvirt 0.9.7 已经发布,我不再收到此错误。

I'm trying to access VirtualBox through libvirt on OS X (Lion). I installed libvirt 0.9.4 using Homebrew. However, libvirt fails to connect to VirtualBox:

# virsh -c vbox:///session
error: internal error unable to initialize VirtualBox driver API
error: failed to connect to the hypervisor

In a similar SO question about Ubuntu, the answer was that the Ubuntu libvirt package doesn't build support for VirtualBox. How can I check if this is the problem in the case of the Homebrew package, or if it's a different issue? If it's the same problem, how do I rebuild the Homebrew package with VirtualBox support?


Edit: libvirt 0.9.7 has been released, and I no longer get this error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

耶耶耶 2024-12-20 02:19:57

您的 libvirt 是使用 VirtualBox 支持构建的。我可以看出,因为您看到的错误消息来自 libvirt 中的 VirtualBox 驱动程序。

libvirt 用户恶意列表中报告了类似的问题 今天。问题是 libvirt 最近才添加了对 VirtualBox 4.1 的支持。它尚未发布,将成为下一个 libvirt 版本 0.9.7 的一部分。

要获得一些更有用的信息,请尝试运行以下命令:

LIBVIRT_LOG_FILTERS=1:vbox virsh -c vbox:///session

我怀疑您安装了 VirtualBox 4.1,但 libvirt 0.9.4 仅支持 VirtualBox 4.0。

您可以 a) 将 libvirt 升级到当前 git 版本(支持 VirtualBox 4.1),或者 b) 等待下一个 libvirt 版本(预计在本周发布),或者 c) 将 VirtualBox 版本降级到 4.0 来解决这个问题,假设您的问题确实如我所怀疑的那样。

Your libvirt is build with VirtualBox support. I can tell because the error message you see comes from the VirtualBox driver in libvirt.

There was a similar problem reported on the libvirt users maling list today. The problem there was that support for VirtualBox 4.1 was added quite recently to libvirt. It's not in a released version yet and will be part of the next libvirt release 0.9.7.

To get some more useful information try running this:

LIBVIRT_LOG_FILTERS=1:vbox virsh -c vbox:///session

I suspect that you have VirtualBox 4.1 installed, but libvirt 0.9.4 supports only up to VirtualBox 4.0.

You can either a) upgrade your libvirt to current git version (that supports VirtualBox 4.1), or b) wait for the next libvirt release (it's expected in this week) or c) downgrade your VirtualBox version to 4.0 to fix this, assuming your problem is really as I suspect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文