libvirt and VirtualBox / Getting Started

删除回忆录丶 提交于 2019-12-03 00:13:49
brainsik

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

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

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).

Andrea Turli

Double-check whether or not you have write access to /var/run/libvirt/libvirt-sock.

The socket file should have permissions similar to:

$ sudo ls -la /var/run/libvirt/libvirt-sock
srwxrwx--- 1 root libvirtd 0 2010-08-24 14:54 /var/run/libvirt/libvirt-sock

I think it could be helpful also to increase the libvirt logging capabilities by running this in your shell:

export LIBVIRT_DEBUG=1

There is Ubuntu PPA for libvirt with VirtualBox support: https://launchpad.net/~cxl/+archive/ubuntu/libvirt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!