Bug 1029073 - Check supported devices/categories for QEMU domains
Check supported devices/categories for QEMU domains
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
:
Depends On: 1029080
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-11 10:38 EST by Martin Kletzander
Modified: 2016-06-13 08:42 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1029080 (view as bug list)
Environment:
Last Closed: 2016-06-13 08:42:51 EDT
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 Martin Kletzander 2013-11-11 10:38:15 EST
Description of problem:
Libvirt does not check whether requested devices are supported by current qemu-kvm binary.  It relies on qemu itself reporting an error, which is fine most of the time.  However, newer versions of libvirt are checking the supported devices when starting the guest.  QEMU also the information to provide list of categories and buses the device can be attached to.

Version-Release number of selected component (if applicable):
libvirt-1.1.1-12.el7
qemu-kvm-1.5.3-19.el7

How reproducible:
101%

Steps to Reproduce:
1. Add the following device into domain XML:

  a.
<interface type='network'>
  <source network='default'/>
  <model type='non-existing_device'/>
</interface>

  b.
<interface type='network'>
  <source network='default'/>
  <model type='AC97'/>
</interface>

2. Start the domain

Actual results:
a. "error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device non-existing_device,...: Parameter 'driver' expects device type"

b. "error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device AC97,...: Property '.netdev' not found"


Expected results:
a. "error: unsupported configuration: Device "non-existing_device" is not supported by this QEMU binary"

b. "error: unsupported configuration: Device "AC97" cannot be used as an interface" ("with this QEMU binary"


Additional info:
Libvirt gets enough information to check for case "a." when executing "qom-list-types".
QEMU does not provide enough information to check for proper usage in case "b.".
Comment 1 hyao@redhat.com 2013-12-25 00:38:56 EST
The bug still reproduce on libvirt:
# rpm -qa libvirt qemu-kvm 
libvirt-1.1.1-16.el7.x86_64
qemu-kvm-1.5.3-30.el7.x86_64

Steps 
1. Add the follwoing element in the domain 
# virsh dumpxml rhel6 |grep interface -A 6
    <interface type='network'>
      <mac address='52:54:00:8a:f5:bc'/>
      <source network='default'/>
      <model type='AC97'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

# virsh start rhel6
error: Failed to start domain rhel6
error: internal error: early end of file from monitor: possible problem:
qemu-kvm: -device AC97,netdev=hostnet0,id=net0,mac=52:54:00:8a:f5:bc,bus=pci.0,addr=0x3: Property '.netdev' not found

2. # virsh dumpxml rhel6 |grep interface -A 6
    <interface type='network'>
      <mac address='52:54:00:8a:f5:bc'/>
      <source network='default'/>
      <model type='not'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>


# virsh start rhel6
error: Failed to start domain rhel6
error: internal error: early end of file from monitor: possible problem:
qemu-kvm: -device not,netdev=hostnet0,id=net0,mac=52:54:00:8a:f5:bc,bus=pci.0,addr=0x3: Parameter 'driver' expects device type
Comment 6 Martin Kletzander 2016-06-13 08:42:51 EDT
Re-iterating this information again, most probably it will not be used in libvirt anyway since we need to know more about the devices.  I will reopen this BZ or create a new one if anything changes.  Sorry for any time wasted.  Closing as a NOTABUG then.

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