[libvirt] libvirt needs to dynamically support kvm-img and/or qemu-img

Doug Goldstein cardoe at gentoo.org
Thu May 28 14:04:55 UTC 2009

Several distros out there install "kvm-img" when they install KVM and
do not install "qemu-img". The following patch checks for kvm-img and
qemu-img and does the right thing. I've taken it a step further and
made the check a run-time check instead of a build-time check since
people are able to remove and install KVM, QEMU and Xen components as
they please and as such may invalidate the build-time check. The patch
prefers "kvm-img" over "qemu-img" over "qcow-create" since there was a
comment that libvirt wanted to support a feature of qemu-img that
wasn't present in upstream qemu releases, however the feature is
present in kvm-img.

The patch adds a new util function called "virFindFileInPath()" which
merely searches PATH for the actual location of the binary. It might
be worth-while to make some of the other build-time tool checks
run-time with that function since it would allow users to get more
features just by installing new tools and wouldn't require distros to
disable features because they don't want libvirt to be too dependency

Doug Goldstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-0.6.3-kvm-img.patch
Type: application/octet-stream
Size: 9798 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090528/94f9b83c/attachment-0001.obj>

More information about the libvir-list mailing list