RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1460008 - useless errmsg when USB kbd capability is missing from QEMU, but the domain XML wants a USB kbd
Summary: useless errmsg when USB kbd capability is missing from QEMU, but the domain X...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4-Alt
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-08 19:57 UTC by Laszlo Ersek
Modified: 2017-11-09 11:26 UTC (History)
6 users (show)

Fixed In Version: libvirt-3.2.0-16.el7a
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-09 11:26:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
aarch64-vgpu-6.xml -- reproducer domain XML for comment 0 (4.20 KB, text/plain)
2017-06-08 19:59 UTC, Laszlo Ersek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:3174 0 normal SHIPPED_LIVE libvirt enhancement update 2017-11-09 16:12:36 UTC

Description Laszlo Ersek 2017-06-08 19:57:35 UTC
*** Description of problem:

- qemu-kvm-rhev-2.9.0-8.el7.aarch64 does not have "CONFIG_USB=y" in
  "default-configs/aarch64-softmmu.mak",

- therefore the source file "hw/usb/dev-hid.c" is not built into the aarch64
  emulator,

- as a consequence, the emulator lacks the usb-tablet and usb-kbd devices,

- consequently, libvirt (correctly) determines that this emulator binary
  lacks the QEMU_CAPS_DEVICE_USB_KBD capability,

- and therefore I cannot start my domain which uses both a USB tablet and a
  USB keyboard.

This would be fine, but the error message is nondescript:

> error: Failed to start domain aarch64-vgpu-6
> error: An error occurred, but the cause is unknown

No reference is given regarding the lack of QEMU_CAPS_DEVICE_USB_KBD vs. the
device types requested by the domain XML.

*** Version-Release number of selected component (if applicable):

libvirt-daemon-3.2.0-7.el7.aarch64

*** How reproducible:

100%

*** Steps to Reproduce:

1. Define a domain from the attached XML ("aarch64-vgpu-6.xml").

2. Start the domain with "virsh start".

*** Actual results:

Unhelpful error message (the fallback message from virDispatchError() -->
virErrorGenericFailure()).

*** Expected results:

The conflict between lacking emulator capabilities and requested device
types should be spelled out.

*** Additional info:

This is the call stack whence the generic error code is propagated outwards:

#0  virQEMUCapsGet (qemuCaps=qemuCaps@entry=0xffff98015fd0,
    flag=flag@entry=QEMU_CAPS_DEVICE_USB_KBD) at
    qemu/qemu_capabilities.c:2318
#1  0x0000ffffa4961a70 in qemuBuildUSBInputDevStr (qemuCaps=0xffff98015fd0,
    dev=0xffff90017270, def=0xffff900155a0) at qemu/qemu_command.c:4211
#2  qemuBuildInputCommandLine (cmd=cmd@entry=0xffff98005be0,
    def=def@entry=0xffff900155a0, qemuCaps=qemuCaps@entry=0xffff98015fd0) at
    qemu/qemu_command.c:4244
#3  0x0000ffffa49734e4 in qemuBuildCommandLine
    (driver=driver@entry=0xffff9c10e500, logManager=0xffff980020a0,
    def=0xffff900155a0, monitor_chr=0xffff98016250,
    monitor_json=monitor_json@entry=true, qemuCaps=0xffff98015fd0,
    migrateURI=migrateURI@entry=0x0, snapshot=snapshot@entry=0x0,
    vmop=VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
    standalone=standalone@entry=false, enableFips=false, nodeset=0x0,
    nnicindexes=nnicindexes@entry=0xffffa98fe0b0,
    nicindexes=nicindexes@entry=0xffffa98fe0b8, domainLibDir=0xffff98007f20
    "/var/lib/libvirt/qemu/domain-20-aarch64-vgpu-6") at
    qemu/qemu_command.c:10060
#4  0x0000ffffa49acabc in qemuProcessLaunch (conn=conn@entry=0xffff98001550,
    driver=driver@entry=0xffff9c10e500, vm=vm@entry=0xffff9c1ad4d0,
    asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_START,
    incoming=incoming@entry=0x0, snapshot=snapshot@entry=0x0,
    vmop=vmop@entry=VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
    flags=flags@entry=19) at qemu/qemu_process.c:5641
#5  0x0000ffffa49adf6c in qemuProcessStart (conn=conn@entry=0xffff98001550,
    driver=driver@entry=0xffff9c10e500, vm=vm@entry=0xffff9c1ad4d0,
    asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_START,
    migrateFrom=migrateFrom@entry=0x0, migrateFd=migrateFd@entry=-1,
    migratePath=migratePath@entry=0x0, snapshot=snapshot@entry=0x0,
    vmop=vmop@entry=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=19,
    flags@entry=3) at qemu/qemu_process.c:6001
#6  0x0000ffffa4a08714 in qemuDomainObjStart (conn=0xffff98001550,
    driver=driver@entry=0xffff9c10e500, vm=0xffff9c1ad4d0,
    flags=flags@entry=1, asyncJob=QEMU_ASYNC_JOB_START) at
    qemu/qemu_driver.c:6968
#7  0x0000ffffa4a08df0 in qemuDomainCreateWithFlags (dom=0xffff98000b40,
    flags=1) at qemu/qemu_driver.c:7022
#8  0x0000ffffb261bbe0 in virDomainCreateWithFlags
    (domain=domain@entry=0xffff98000b40, flags=1) at libvirt-domain.c:6595
#9  0x0000aaaaab666a04 in remoteDispatchDomainCreateWithFlags
    (server=<optimized out>, msg=0xaaaabcce0670, ret=0xffff98016310,
    args=0xffff980160c0, rerr=0xffffa98fe720, client=<optimized out>) at
    remote_dispatch.h:4307
#10 remoteDispatchDomainCreateWithFlagsHelper (server=<optimized out>,
    client=<optimized out>, msg=0xaaaabcce0670, rerr=0xffffa98fe720,
    args=0xffff980160c0, ret=0xffff98016310) at remote_dispatch.h:4282
#11 0x0000ffffb2686188 in virNetServerProgramDispatchCall
    (msg=0xaaaabcce0670, client=0xaaaabcce0760, server=0xaaaabccc2dc0,
    prog=0xaaaabcccf970) at rpc/virnetserverprogram.c:437
#12 virNetServerProgramDispatch (prog=0xaaaabcccf970,
    server=server@entry=0xaaaabccc2dc0, client=0xaaaabcce0760,
    msg=0xaaaabcce0670) at rpc/virnetserverprogram.c:307
#13 0x0000aaaaab689410 in virNetServerProcessMsg (msg=<optimized out>,
    prog=<optimized out>, client=<optimized out>, srv=0xaaaabccc2dc0) at
    rpc/virnetserver.c:148
#14 virNetServerHandleJob (jobOpaque=<optimized out>, opaque=0xaaaabccc2dc0)
    at rpc/virnetserver.c:169
#15 0x0000ffffb2577274 in virThreadPoolWorker
    (opaque=opaque@entry=0xaaaabccb6ef0) at util/virthreadpool.c:167
#16 0x0000ffffb25765f8 in virThreadHelper (data=<optimized out>) at
    util/virthread.c:206
#17 0x0000ffffb1cf7bb0 in start_thread () from /lib64/libpthread.so.0
#18 0x0000ffffb1c3b650 in thread_start () from /lib64/libc.so.6

Comment 2 Laszlo Ersek 2017-06-08 19:59:18 UTC
Created attachment 1286218 [details]
aarch64-vgpu-6.xml -- reproducer domain XML for comment 0

Comment 3 Ján Tomko 2017-06-09 06:38:26 UTC
Proposed upstream patch:
https://www.redhat.com/archives/libvir-list/2017-June/msg00456.html

Comment 4 Ján Tomko 2017-06-09 07:26:17 UTC
Pushed upstream with an incorrect bug link in the commit message:
commit 3596b1ddf912418f70c9eaa07d460aacf574bbfd
Author:     Ján Tomko <jtomko>
CommitDate: 2017-06-09 08:29:12 +0200

    qemu: report an error if usb keyboards are unsupported
    
    Be nicer to the user and report a proper error instead of:
    An error occurred, but the cause is unknown
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1460086

git describe: v3.4.0-84-g3596b1d

Comment 5 Laszlo Ersek 2017-06-09 18:05:40 UTC
Bug 1460086 is unrelated; I think that's a mis-paste in the upstream commit. I'll add a note to bug 1460086 about this.

Thanks for the quick fix, Ján!

Comment 9 Andrea Bolognani 2017-08-08 12:54:14 UTC
I have confirmed the issue has indeed been addressed.

Please move this bug to VERIFIED.

Comment 10 Dan Zheng 2017-08-23 07:40:04 UTC
Regarding to comment 9, we verify it now.

Comment 12 errata-xmlrpc 2017-11-09 11:26:03 UTC
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://access.redhat.com/errata/RHEA-2017:3174


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