Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1431137 - USB device is not available for client if remote-viewer has --spice-disable-usbredir option
USB device is not available for client if remote-viewer has --spice-disable-u...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: mingw-virt-viewer (Show other bugs)
4.1.0
Unspecified Unspecified
unspecified Severity medium
: ovirt-4.2.0
: ---
Assigned To: Victor Toso
SPICE QE bug list
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-10 07:42 EST by Andrei Stepanov
Modified: 2018-05-15 14:03 EDT (History)
13 users (show)

See Also:
Fixed In Version: mingw-virt-viewer-2.0-15.el7ev mingw-spice-gtk-0.31-7.el7ev
Doc Type: Bug Fix
Doc Text:
Previously, connecting to a guest with the remote-viewer option, '--spice-disable-usbredir', while 'enable-usb-autoshare' is set to '1' in the vv file, resulted in USB devices being hidden from the client and the guest. The current release checks whether usbredir is enabled before hiding USB devices from the client, and devices now appear in the client.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-05-15 14:02:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Spice
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
mingw remote-viewer log (61.46 KB, text/plain)
2017-03-10 07:48 EST, Andrei Stepanov
no flags Details
USB devices list (27.14 KB, text/plain)
2017-03-10 11:43 EST, Andrei Stepanov
no flags Details
Driver Text Traces (27.25 KB, text/plain)
2017-03-10 11:45 EST, Andrei Stepanov
no flags Details
Driver Traces in Text (6.68 KB, text/plain)
2017-03-10 12:02 EST, Andrei Stepanov
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1543 None None None 2018-05-15 14:03 EDT

  None (edit)
Description Andrei Stepanov 2017-03-10 07:42:46 EST
Description of problem:

USB device is not available for client Windows10, if:
1. remote-viewer is invoked with --spice-disable-usbredir.
2. USB autoshare is ON: console.vv file has enable-usb-autoshare=1

--spice-disable-usbredir option disables USB redirection. USB device should be available for client all time.

spice-client-msi-x86-4.1-6.el7ev.noarch

How reproducible: always

Steps to Reproduce:
1. Login to RHV user portal.
2. Select any VM. It could be RHEL or Windows guest.
3. Edit its console options. Set "Enable USB Auto-Share" to ON.
4. Press "CONSOLE" button to save .vv file.
5. Open cmd/powershell
6. Run remote-viewer.exe --spice-disable-usbredir console.vv
7. Make sure remote-viewer window is active.
8. Plug-in USB device.

Actual results: USB device doesn't appear in client, neither in guest.

Expected results: USB device should appear in client.

Additional info: RHEL7.3 client doesn't have such problem.
Comment 1 Andrei Stepanov 2017-03-10 07:48 EST
Created attachment 1261931 [details]
mingw remote-viewer log
Comment 2 Pavel Grunt 2017-03-10 07:50:16 EST
if you intentionally add --spice-disable-usbredir then you cannot be surprised that usb redirection is not available

From spice-gtk man page/remote-viewer --help-spice:
--spice-disable-usbredir   Disable USB redirection support
Comment 3 Andrei Stepanov 2017-03-10 08:01:57 EST
We had discussion at IRC. It indeed is as a bug.
Comment 4 Andrei Stepanov 2017-03-10 11:43 EST
Created attachment 1262011 [details]
USB devices list

Device of interest is: "Kingston".
Comment 5 Andrei Stepanov 2017-03-10 11:45 EST
Created attachment 1262012 [details]
Driver Text Traces

As described at: https://cgit.freedesktop.org/spice/win32/usbdk/tree/Documentation/Tracing.txt#n21
Comment 6 Andrei Stepanov 2017-03-10 12:02 EST
Created attachment 1262014 [details]
Driver Traces in Text

As described at: https://cgit.freedesktop.org/spice/win32/usbdk/tree/Documentation/Tracing.txt#n66
Comment 7 Eduardo Lima (Etrunko) 2017-03-10 15:21:00 EST
(In reply to Andrei Stepanov from comment #3)
> We had discussion at IRC. It indeed is as a bug.

Can you provide more details about this IRC discussion you had?
Comment 9 David Blechter 2017-03-10 16:13:03 EST
Andrei,

Is it reproducible on windows 7?
Comment 10 Victor Toso 2017-03-13 06:52:57 EDT
User needs to set --spice-disable-usbredir in the command line to trigger this. It's not a blocker for 4.1.
Comment 11 Andrei Stepanov 2017-03-13 08:39:04 EDT
In reply to Comment 9 https://bugzilla.redhat.com/show_bug.cgi?id=1431137#c9 :

Windows 7 32 client + spice-client-msi-x86-4.1-6.el7ev.noarch doesn't have this bug.
Comment 12 Dmitry Fleytman 2017-03-13 09:46:23 EDT
It might be that setting hide rules from inside of spice-gtk is not synchronized with --spice-disable-usbredir CLI parameter.

We will check this...
Comment 13 Victor Toso 2017-04-20 07:01:17 EDT
Proposed fix accepted upstream: 12e77f5c5ecfd7e096effb86689cc1e7f9b85b68
"usb-device-manager: Do not hide devices on client if USB redirection disabled"
Comment 14 ybendito 2017-05-07 05:41:10 EDT
What is the procedure to apply the fix to downstream?
Shall we change the owner?
Comment 15 Victor Toso 2017-05-09 02:32:07 EDT
(In reply to ybendito from comment #14)
> What is the procedure to apply the fix to downstream?
> Shall we change the owner?

Yes, moved to mingw-virt-viewer. Thanks!

This does not seems urgent to have a z-stream build so it will land on 4.2.
Comment 16 Victor Toso 2017-12-11 05:39:09 EST
Fixing virt-viewer version that this bug should really be fixed. Previous build did not pick the correct dependencies with the backported patches.
Comment 18 David Jaša 2018-04-18 13:27:15 EDT
The fix doesn't work for me in the current build (UsbDk 0.19 + mvv 2.0-240/spice-client-msi-x64-4.2-1): when the --spice-disable-usbredir option is used, USB sharing keeps being disabled regardless of autoshare setting in .vv file.

I still don't understand however why is this a bug, shouldn't have the "disable usbredir" option have precedence over the autoshare option?
Comment 19 Victor Toso 2018-04-19 00:24:55 EDT
(In reply to David Jaša from comment #18)
> I still don't understand however why is this a bug, shouldn't have the
> "disable usbredir" option have precedence over the autoshare option?

I think the log from proposed fix is quite good explanation:

commit 12e77f5c5ecfd7e096effb86689cc1e7f9b85b68
Author: Yuri Benditovich <yuri.benditovich@daynix.com>
Date:   Tue Apr 11 11:43:03 2017 +0300

    usb-device-manager: Do not hide devices on client if USB redirection disabled
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1431137
    When auto sharing of USB devices is enabled in remote-viewer's configuration
    file, Windows spice client hides connected USB devices on client machine even
    if USB redirection is disabled by --spice-disable-usbredir

I'll check again if I missed something with the backporting.
Comment 20 David Jaša 2018-04-24 08:01:10 EDT
So the desired behaviour is to display all the devices just with disabled checkboxes?

My thinking would be that --spice-disable-usbredir makes all autoshare actions NOOP.
Comment 25 errata-xmlrpc 2018-05-15 14:02:00 EDT
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/RHBA-2018:1543

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