[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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

-- 
Doug Goldstein

Attachment: libvirt-0.6.3-kvm-img.patch
Description: Binary data


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]