Bug 1029080 - List supported categories in "qom-list-types" qmp command.
List supported categories in "qom-list-types" qmp command.
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Marcel Apfelbaum
: FutureFeature
Depends On:
Blocks: 1029073
  Show dependency treegraph
Reported: 2013-11-11 10:50 EST by Martin Kletzander
Modified: 2017-11-08 07:31 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1029073
Last Closed: 2017-11-08 07:31:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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:50:09 EST
+++ This bug was initially created as a clone of Bug #1029073 +++

This bug is to track the qemu-kvm part of the work.  Output of:
might look like:
{"return":[{"name":"AC97", bus: 'PCI', categories:['sound']}, ...

Upstream QEMU already outputs this info when using 'qemu-kvm -device \?'

The 'bus' field in the output is not mandatory.

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):

How reproducible:

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

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

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

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 Markus Armbruster 2014-01-13 09:31:41 EST
Comment 10 Martin Kletzander 2015-09-08 05:51:34 EDT
After recent discussions it looks like we won't make use of it anytime soon.  Feel free to move this to an upstream tracker or close is, whatever is appropriate for you.  Thanks for dealing with this and sorry for the time wasted on this.  I might have mentioned this earlier, so this is just a reminder that the priority has dropped for us.
Comment 13 Martin Kletzander 2017-11-08 07:31:50 EST
Pointless for libvirt, would just waste time, mostly, no developlment for now. Closing as DEFERRED, feel free to reopen if there is some development.

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