Bug 1260753 - 'virsh domcapabilities' fails for ppc64le
'virsh domcapabilities' fails for ppc64le
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.2
ppc64le Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Andrea Bolognani
Virtualization Bugs
:
Depends On:
Blocks: RHEV3.6PPC 1277183 1277184
  Show dependency treegraph
 
Reported: 2015-09-07 11:41 EDT by Andrea Bolognani
Modified: 2018-03-26 02:40 EDT (History)
12 users (show)

See Also:
Fixed In Version: libvirt-1.2.17-10.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 01:52:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrea Bolognani 2015-09-07 11:41:26 EDT
Running plain 'virsh domcapabilities' results in an error:

  $ sudo virsh domcapabilities
    error: failed to get emulator capabilities
    error: invalid argument: unable to find any emulator to \
    serve 'ppc64le' architecture

This is similar to Bug 1210159. Basically, the QEMU capabilities
cache does contain an entry associating the ppc64 architecture to
the /usr/libexec/qemu-kvm binary, but no such association exist
for the ppc64le architecture.

The same happens when running 'virsh domcapabilities --arch ppc64le'
on an x86_64 host with the qemu-system-ppc package installed.

  libvirt-daemon-1.2.17-7.el7.ppc64le
  qemu-kvm-rhev-2.3.0-22.el7.ppc64le
Comment 2 Dan Zheng 2015-09-10 02:06:22 EDT
Reproduced using below packages already.
  libvirt-daemon-1.2.17-7.el7.ppc64le
  qemu-kvm-rhev-2.3.0-22.el7.ppc64le
Comment 3 Dan Zheng 2015-09-10 03:03:37 EDT
--virttype,--arch, --machine  options also fail with same error.

# virsh domcapabilities --virttype kvm
error: failed to get emulator capabilities
error: invalid argument: unable to find any emulator to serve 'ppc64le' architecture

# virsh domcapabilities --arch ppc64le
Same error as above.
# virsh domcapabilities --machine pseries-rhel7.2.0
Same error as above.
Comment 4 Andrea Bolognani 2015-09-15 07:55:57 EDT
I've proposed a patch upstream.

https://www.redhat.com/archives/libvir-list/2015-September/msg00471.html
Comment 5 Andrea Bolognani 2015-09-16 04:34:47 EDT
The issue has been fixed upstream.

commit eb36666d22d52ecf0a1755dd0a8a45de982e00fb
Author: Andrea Bolognani <abologna@redhat.com>
Date:   Tue Sep 15 15:58:09 2015 +0200

    qemu: Fix using guest architecture as lookup key
    
    When looking for a QEMU binary suitable for running ppc64le guests
    we have to take into account the fact that we use the QEMU target
    as key for the hash, so direct comparison is not good enough.
    
    Factor out the logic from virQEMUCapsFindBinaryForArch() to a new
    virQEMUCapsFindTarget() function and use that both when looking
    for QEMU binaries available on the system and when looking up
    QEMU capabilities later.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260753

v1.2.19-62-geb36666
Comment 8 Dan Zheng 2015-09-16 21:47:55 EDT
Test on packages below:
kernel-3.10.0-316.el7.ppc64le
qemu-kvm-rhev-2.3.0-23.el7.ppc64le
libvirt-1.2.17-8.el7+abologna+bz1260753.ppc64le

Below commands are executed:
All pass.

# virsh domcapabilities 
<domainCapabilities>
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc64le</arch>
  <vcpu max='255'/>
  <os supported='yes'>
    <loader supported='yes'>
      <enum name='type'>
        <value>rom</value>
        <value>pflash</value>
      </enum>
      <enum name='readonly'>
        <value>yes</value>
        <value>no</value>
      </enum>
    </loader>
  </os>
  <devices>
    <disk supported='yes'>
      <enum name='diskDevice'>
        <value>disk</value>
        <value>cdrom</value>
        <value>floppy</value>
        <value>lun</value>
      </enum>
      <enum name='bus'>
        <value>ide</value>
        <value>fdc</value>
        <value>scsi</value>
        <value>virtio</value>
        <value>usb</value>
      </enum>
    </disk>
    <hostdev supported='yes'>
      <enum name='mode'>
        <value>subsystem</value>
      </enum>
      <enum name='startupPolicy'>
        <value>default</value>
        <value>mandatory</value>
        <value>requisite</value>
        <value>optional</value>
      </enum>
      <enum name='subsysType'>
        <value>usb</value>
        <value>pci</value>
        <value>scsi</value>
      </enum>
      <enum name='capsType'/>
      <enum name='pciBackend'>
        <value>default</value>
        <value>vfio</value>
      </enum>
    </hostdev>
  </devices>
</domainCapabilities>

# virsh domcapabilities --virttype kvm	
# virsh domcapabilities	--emulatorbin /usr/libexec/qemu-kvm
# virsh domcapabilities --arch ppc64le	
# virsh domcapabilities --machine pseries-rhel7.2.0	

The above four commands' results are same with above output.

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppc	    
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppcle	  
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppcle</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppc64le	 
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc64le</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppc64	  
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc64</arch>
# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppcemb
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppcemb</arch>
Comment 13 Dan Zheng 2015-09-23 21:42:02 EDT
Test on packages below:
kernel-3.10.0-316.el7.ppc64le
qemu-kvm-rhev-2.3.0-25.el7.ppc64le
libvirt-1.2.17-10.el7.ppc64le
Guest :Kernel 3.10.0-316.el7.ppc64le

Below commands are executed:
All pass.


# virsh domcapabilities
<domainCapabilities>
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc64le</arch>
  <vcpu max='255'/>
  <os supported='yes'>
    <loader supported='yes'>
      <enum name='type'>
        <value>rom</value>
        <value>pflash</value>
      </enum>
      <enum name='readonly'>
        <value>yes</value>
        <value>no</value>
      </enum>
    </loader>
  </os>
  <devices>
    <disk supported='yes'>
      <enum name='diskDevice'>
        <value>disk</value>
        <value>cdrom</value>
        <value>floppy</value>
        <value>lun</value>
      </enum>
      <enum name='bus'>
        <value>ide</value>
        <value>fdc</value>
        <value>scsi</value>
        <value>virtio</value>
        <value>usb</value>
      </enum>
    </disk>
    <hostdev supported='yes'>
      <enum name='mode'>
        <value>subsystem</value>
      </enum>
      <enum name='startupPolicy'>
        <value>default</value>
        <value>mandatory</value>
        <value>requisite</value>
        <value>optional</value>
      </enum>
      <enum name='subsysType'>
        <value>usb</value>
        <value>pci</value>
        <value>scsi</value>
      </enum>
      <enum name='capsType'/>
      <enum name='pciBackend'>
        <value>default</value>
        <value>vfio</value>
      </enum>
    </hostdev>
  </devices>
</domainCapabilities>


# virsh domcapabilities --virttype kvm	
# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm
# virsh domcapabilities --arch ppc64le	
# virsh domcapabilities --machine pseries-rhel7.2.0	
om
The above four commands' results are same with above output.

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppc	    
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppcle	  
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppcle</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppc64le	 
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc64le</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppc64	  
  <path>/usr/libexec/qemu-kvm</path>
  <domain>qemu</domain>
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppc64</arch>

# virsh domcapabilities --emulatorbin /usr/libexec/qemu-kvm --arch ppcemb
  <machine>pseries-rhel7.2.0</machine>
  <arch>ppcemb</arch>
Comment 15 errata-xmlrpc 2015-11-19 01:52:55 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2202.html

Note You need to log in before you can comment on or make changes to this bug.