Posted: Mon, 25 February 2013
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 `virsh`
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.