libvirt errors that are not helpful
Posted: Mon, 25 February 2013 | permalink | 1 Comment
Since there is absolutely zero Google juice on this problem, here’s some hints in case someone else is out there beating their heads on their keyboard in frustration.
The problem: when trying to define a storage pool (or 90+% of other
commands), you get this sort of result:
# virsh pool-define /tmp/pooldef error: Failed to define pool from /tmp/pooldef error: this function is not supported by the connection driver: virStoragePoolDefineXML
# virsh pool-create /tmp/pooldef error: Failed to create pool from /tmp/pooldef error: this function is not supported by the connection driver: virStoragePoolCreateXML
Not helpful at all. The problem is (or, at least it was for me) that I have both KVM and virtualbox installed (I prefer KVM, but vagrant uses virtualbox and I’m playing around with it). It would appear that libvirt is preferring to use virtualbox over KVM, which is stupid because virtualbox doesn’t appear to be fully supported (as evidenced by the extensive set of functions that are not supported by the virtualbox connection driver).
The solution: edit
/etc/libvirt/libvirt.conf, and ensure that the
following line is defined:
uri_default = "qemu:///system"
This will tell libvirt to use KVM (via qemu) rather than virtualbox, and you can play with pools to your hearts’ content.
I have the problem this function is not supported by the connection driver too. I use Xen, and while uri_default = “qemu:///system” is defined,error still exists. Moreover, I can’t use other virsh command. error: failed to connect to the hypervisor error: no valid connection error: no connection driver available for qemu:///system error: Failed to reconnect to the hypervisor
Post a comment
All comments are held for moderation; markdown formatting accepted.