libvirt的VirtualBox的和/入门 [英] libvirt and VirtualBox / Getting Started
问题描述
我想开始与VirtualBox的libvirt的一个虚拟化解决方案。我安装了一切,VirtualBox的本身是使用他们的VBoxHeadless命令时运行。
然而,libvirt的无法连接到VirtualBox的:
I'm trying to get started on libvirt with VirtualBox as a virtualization solution. I installed everything and VirtualBox itself is running when using their VBoxHeadless command. However, libvirt fails to connect to VirtualBox:
# virsh -c vbox:///session
libvir: error : could not connect to vbox:///session
error: failed to connect to the hypervisor
我找不到libvirt的文档中指向我是否有使用的virsh前进行任何特定域配置的任何提示。
I could not find any hints in the libvirt documentation that point to whether I have to make any domain specific configuration before using virsh.
有没有人有一个提示吗?甚至更好,也许通过使用libvirt的,的virsh的方式工作,或者它从地上爬起来的API(我后来的目标)的教程。
Does anyone have a hint? Or even better, maybe a tutorial that works through the way of using libvirt, virsh or it's APIs (my later goal) from the ground up.
推荐答案
如果你正在做这个在Ubuntu,那么问题是他们的 libvirt的包是没有内置支持的VirtualBox 。
If you are doing this on Ubuntu, then the problem is their libvirt package is built without VirtualBox support.
您可以很容易重建包的支持。是这样的:
You can rebuild the package with support very easily. Something like:
apt-get source -d libvirt
sudo apt-get build-dep libvirt
dpkg-source -x libvirt*dsc
进入到 libvirt的
目录,并修改的debian /规则
,这样,而不是 -
与-VBOX - -without-VBOX 它说。您可以添加到
的debian /更新日志
这样的包被编译成不同的版本(例如,追加〜LOCAL1的版本)。
Go into the libvirt
directory and edit debian/rules
so that instead of --without-vbox
it says --with-vbox
. You can add an entry to the top of debian/changelog
so the package is compiled as a different version (e.g., append ~local1 to the version).
dpkg-buildpackage -us -uc -b -rfakeroot
您会得到建在上面的目录中新的.deb文件。使用 dpkg -i来
来安装相关的人(libvirt0,libvirt0斌,和其他任何你想要的)。
You'll get new .debs built in the directory above. Use dpkg -i
to install the relevant ones (libvirt0, libvirt0-bin, and whatever else you want).
这篇关于libvirt的VirtualBox的和/入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!