本文介绍了OS X上的libvirt和VirtualBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

关于Ubuntu的类似问题,答案是Ubuntu libvirt软件包不构建对VirtualBox的支持.在Homebrew软件包的情况下,如何检查这是问题所在,还是其他问题?如果是同一问题,如何在VirtualBox支持下重建Homebrew软件包?

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?

libvirt 0.9.7已发布,并且我不再遇到此错误.

推荐答案

您的libvirt带有VirtualBox支持.我知道是因为您看到的错误消息来自libvirt中的VirtualBox驱动程序.

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

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

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

我怀疑您已经安装了VirtualBox 4.1,但是libvirt 0.9.4仅支持VirtualBox 4.0.

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

您可以a)将libvirt升级到当前的git版本(支持VirtualBox 4.1),或者b)等待下一个libvirt版本(预计在本周发布),或者c)将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.

这篇关于OS X上的libvirt和VirtualBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-30 10:49