[libvirt] [PATCH] Look in /usr/libexec for the qemu-kvm binary.
Matthias Bolte
matthias.bolte at googlemail.com
Mon Jan 25 20:45:22 UTC 2010
2010/1/25 Chris Lalancette <clalance at redhat.com>:
> On 01/25/2010 02:44 PM, Daniel P. Berrange wrote:
>> On Mon, Jan 25, 2010 at 08:38:26PM +0100, Matthias Bolte wrote:
>>> 2010/1/25 Chris Lalancette <clalance at redhat.com>:
>>>> On RHEL-5 the qemu-kvm binary is located in /usr/libexec.
>>>> To reduce confusion for people trying to run upstream libvirt
>>>> on RHEL-5 machines, make the qemu driver look in /usr/libexec
>>>> for the qemu-kvm binary.
>>>>
>>>> Signed-off-by: Chris Lalancette <clalance at redhat.com>
>>>> ---
>>>> src/qemu/qemu_conf.c | 3 ++-
>>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
>>>> index c227fe1..2ba8366 100644
>>>> --- a/src/qemu/qemu_conf.c
>>>> +++ b/src/qemu/qemu_conf.c
>>>> @@ -797,7 +797,8 @@ qemudCapsInitGuest(virCapsPtr caps,
>>>> */
>>>> if (STREQ(info->arch, hostmachine) ||
>>>> (STREQ(hostmachine, "x86_64") && STREQ(info->arch, "i686"))) {
>>>> - const char *const kvmbins[] = { "/usr/bin/qemu-kvm", /* Fedora */
>>>> + const char *const kvmbins[] = { "/usr/libexec/qemu-kvm", /* RHEL */
>>>> + "/usr/bin/qemu-kvm", /* Fedora */
>>>> "/usr/bin/kvm" }; /* Upstream .spec */
>>>>
>>>> for (i = 0; i < ARRAY_CARDINALITY(kvmbins); ++i) {
>>>> --
>>>> 1.6.6
>>>>
>>>
>>> Is /usr/libexec in PATH? Then the following patch will solve this problem too:
>>
>> No, its not in the $PATH in this case. The RHEL packaging puts KVM in
>> the /usr/libexec hierarchy explicitly because it is not intended to be
>> run directly by end users. In any case, can you apply your patch, and
>> then we can re-do Chris' patch on top of it.
>
> Ah, I didn't realize Mattias' patch was still outstanding. I'll wait until
> he pushes and then recreate this patch.
>
> --
> Chris Lalancette
>
I pushed the lookup-in-PATH patch.
Matthias
More information about the libvir-list
mailing list