Bug 504046
Summary: | libvirt must look in /usr/libexec for qemu-kvm binary as priority over /usr/bin | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Daniel Berrangé <berrange> | ||||||
Component: | libvirt | Assignee: | Daniel Veillard <veillard> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 5.4 | CC: | apevec, berrange, cpelland, ehabkost, llim, markmc, mjenner, nzhang, ovirt-maint, rjones, sghosh, virt-maint, xen-maint, yzhou | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-09-02 09:20:48 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 503955 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Daniel Berrangé
2009-06-03 22:36:03 UTC
Created attachment 346515 [details]
Check for kvm binary in libexec
To verify it is working correctly, do
# virsh -c qemu:///system capabilities
<capabilities>
<host>
<cpu>
<arch>x86_64</arch>
</cpu>
<topology>
<cells num='1'>
<cell id='0'>
<cpus num='2'>
<cpu id='0'/>
<cpu id='1'/>
</cpus>
</cell>
</cells>
</topology>
</host>
<guest>
<os_type>hvm</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<emulator>/usr/libexec/qemu-kvm</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/libexec/qemu-kvm</emulator>
</domain>
</arch>
<features>
<pae/>
<nonpae/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/libexec/qemu-kvm</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/libexec/qemu-kvm</emulator>
</domain>
</arch>
<features>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
</capabilities>
Note that it should fine qemu-kvm in /usr/libexec as per this example
libvirt-0.6.3-6.el5 has been built in dist-5E-qu-candidate with the fix, Daniel Verified with libvirt 0.6.3-6 on RHEL-5.4, did not find qemu-kvm in /usr/libexec: [root@dhcp-66-70-85 ~]# virsh -c qemu:///system capabilities <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> <topology> <cells num='1'> <cell id='0'> <cpus num='2'> <cpu id='0'/> <cpu id='1'/> </cpus> </cell> </cells> </topology> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu-kvm</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-kvm</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> </capabilities> [root@dhcp-66-70-85 ~]# ls /usr/bin/qemu-kvm /usr/bin/qemu-kvm [root@dhcp-66-70-85 ~]# ls /usr/libexec/qemu-kvm ls: /usr/libexec/qemu-kvm: No such file or directory [root@dhcp-66-70-85 ~]# [root@dhcp-66-70-85 ~]# rpm -qa | grep kvm kvm-tools-83-56.el5ovirt etherboot-zroms-kvm-5.4.4-10.el5 kmod-kvm-83-56.el5ovirt kvm-qemu-img-83-56.el5ovirt etherboot-roms-kvm-5.4.4-10.el5 kvm-83-56.el5ovirt [root@dhcp-66-70-85 ~]# You haven't updated to a new enough KVM RPM. kvm-83-56.el5ovirt is still in /usr/bin. * Wed Jun 03 2009 Eduardo Habkost <ehabkost> - 83-59.el5ovirt - Move qemu-kvm to /usr/libexec, and make /usr/bin/qemu-kvm a symlink to it - Related: bz#489654 This BZ is against RHEL 5.4 but I don't see /usr/libexec/qemu-kvm in kvm.el5 version: https://brewweb.devel.redhat.com/rpminfo?rpmID=1321707 Regardless of whether testing on 5.4 or 5.4-ovirt, it is necessary to install a KVM RPM with the qemu-kvm binary in /usr/libexec, before you can verify this libvirt fix. libvirt simply reports where the KVM binary is located. It won't report it as in /usr/libexec, if the KVM rpm still only has it in /usr/bin Yes, it's fixed with the latest KVM package. Verified with libvirt 0.6.3-6 on RHEL-5.4. [root@dhcp-66-70-85 ~]# rpm -qa | grep kvm kvm-83-65.el5 etherboot-zroms-kvm-5.4.4-10.el5 kvm-qemu-img-83-65.el5 kmod-kvm-83-65.el5 kvm-tools-83-65.el5 etherboot-roms-kvm-5.4.4-10.el5 kvm-debuginfo-83-65.el5 [root@dhcp-66-70-85 ~]# virsh -c qemu:///system capabilities <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> <topology> <cells num='1'> <cell id='0'> <cpus num='2'> <cpu id='0'/> <cpu id='1'/> </cpus> </cell> </cells> </topology> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/libexec/qemu-kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/libexec/qemu-kvm</emulator> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> </capabilities> Seems it was luck that this worked, because KVM had the binary in /usr/bin and /usr/libexec. Now that it has gone from /usr/bin completely, this now fails Created attachment 347248 [details]
Remove bogus & redundant probe
There is a bogus piece of code that probes for binaries in /usr/bin. This is redundant, since the previous qemu_driver check is the important one that determines if QEMU driver is available or not.
This patch is in addition to the previous one.
<grin/> patch is trivial, IMHO fine for 5.4 Daniel libvirt-0.6.3-8.el5 has been built with the fix in dist-5E-qu-candidate Daniel Has been fixed on libvirt-0.6.3-8.el5 [root@dhcp-66-70-85 ~]# rpm -qa | grep kvm kvm-83-74.el5 etherboot-zroms-kvm-5.4.4-10.el5 kvm-qemu-img-83-74.el5 etherboot-roms-kvm-5.4.4-10.el5 kmod-kvm-83-74.el5 [root@dhcp-66-70-85 ~]# virsh -c qemu:///system capabilities <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> <topology> <cells num='1'> <cell id='0'> <cpus num='2'> <cpu id='0'/> <cpu id='1'/> </cpus> </cell> </cells> </topology> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/libexec/qemu-kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/libexec/qemu-kvm</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/libexec/qemu-kvm</emulator> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> </capabilities> [root@dhcp-66-70-85 ~]# ll /usr/libexec/qemu* -rwxr-xr-x 1 root root 1954424 Jun 9 13:09 /usr/libexec/qemu-kvm [root@dhcp-66-70-85 ~]# ll /usr/bin/qemu* -rwxr-xr-x 1 root root 149928 Jun 9 13:09 /usr/bin/qemu-img -rwxr-xr-x 1 root root 144928 Jun 9 13:09 /usr/bin/qemu-nbd [root@dhcp-66-70-85 ~]# An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1269.html |