Bug 844073 - RFE: please add support for qemu -device usb-redir,debug=# option
RFE: please add support for qemu -device usb-redir,debug=# option
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Libvirt Maintainers
Virtualization Bugs
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-28 11:39 EDT by Hans de Goede
Modified: 2012-07-30 14:09 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-30 14:09:34 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 Hans de Goede 2012-07-28 11:39:12 EDT
Please add support for qemu -device usb-redir,debug=# option, usb-redir devices have a debug= option which is quite useful to help debugging problems with usb-redirection, currently users reporting usb redirection problems need to start qemu manually to be able to gather debug logs.

To be clear about what is needed, currently libvirt generates the following qemu cmdline "snippets" for usb-redir devices:

 -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=3

This bug is about changing this to for example:

 -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=3,debug=3

The default value for the debug parameter should be 0.
Comment 1 Daniel Berrange 2012-07-30 03:52:54 EDT
I'm not convinced this kind of thing should be exposed in the libvirt XML. It should already be possible to toggle this when troubleshooting without having to start QEMU manually, by using the QEMU ARGV passthrough option and the '-set' argument to override the device property
Comment 2 Hans de Goede 2012-07-30 06:10:35 EDT
(In reply to comment #1)
> I'm not convinced this kind of thing should be exposed in the libvirt XML.
> It should already be possible to toggle this when troubleshooting without
> having to start QEMU manually, by using the QEMU ARGV passthrough option and
> the '-set' argument to override the device property

If this is indeed already possible then I agree that adding it to the libvirt XML is not necessarily a good idea,
can you give an example of how the QEMU ARGV passthrough option and the '-set' argument can be used to already do this? And/or provide a pointer to some documentation in this?
Comment 3 Daniel Berrange 2012-07-30 06:19:44 EDT
If you do 'virsh dumpxml $GUEST', and identify the <alias name=XXX>, associated with the usb-redir device, you can then use that in -set device.XXXX.debug=4. So assuming the id was 'usbredir0' this could be set in libvirt XML thus:

<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  ...
  <devices>
    ...
  </devices>
  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.usbredir0.debug=4'/>
  </qemu:commandline>
</domain>
Comment 4 Hans de Goede 2012-07-30 06:46:46 EDT
Ok, that works to enable the debugging, note to self the actual device aliases are redir0, redir1, etc.

So with this method of setting the debug parameter being present I'm fine with closing this as notabug.
Comment 5 Dave Allan 2012-07-30 14:09:34 EDT
(In reply to comment #4)
> So with this method of setting the debug parameter being present I'm fine
> with closing this as notabug.

Ok, done.

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