Bug 1431137 - USB device is not available for client if remote-viewer has --spice-disable-usbredir option
Summary: USB device is not available for client if remote-viewer has --spice-disable-u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: mingw-virt-viewer
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: Victor Toso
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-10 12:42 UTC by Andrei Stepanov
Modified: 2019-05-16 13:15 UTC (History)
12 users (show)

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.
Clone Of:
Environment:
Last Closed: 2018-05-15 18:02:00 UTC
oVirt Team: Spice
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1543 0 None None None 2018-05-15 18:03:13 UTC

Description Andrei Stepanov 2017-03-10 12:42:46 UTC
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 12:48:04 UTC
Created attachment 1261931 [details]
mingw remote-viewer log

Comment 2 Pavel Grunt 2017-03-10 12:50:16 UTC
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 13:01:57 UTC
We had discussion at IRC. It indeed is as a bug.

Comment 4 Andrei Stepanov 2017-03-10 16:43:49 UTC
Created attachment 1262011 [details]
USB devices list

Device of interest is: "Kingston".

Comment 5 Andrei Stepanov 2017-03-10 16:45:56 UTC
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 17:02:16 UTC
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 20:21:00 UTC
(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 21:13:03 UTC
Andrei,

Is it reproducible on windows 7?

Comment 10 Victor Toso 2017-03-13 10:52:57 UTC
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 12:39:04 UTC
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 13:46:23 UTC
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 11:01:17 UTC
Proposed fix accepted upstream: 12e77f5c5ecfd7e096effb86689cc1e7f9b85b68
"usb-device-manager: Do not hide devices on client if USB redirection disabled"

Comment 14 ybendito 2017-05-07 09:41:10 UTC
What is the procedure to apply the fix to downstream?
Shall we change the owner?

Comment 15 Victor Toso 2017-05-09 06:32:07 UTC
(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 10:39:09 UTC
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 17:27:15 UTC
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 04:24:55 UTC
(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>
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 12:01:10 UTC
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 18:02:00 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/RHBA-2018:1543

Comment 26 Franta Kust 2019-05-16 13:08:44 UTC
BZ<2>Jira Resync


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