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 838993 - USBredir rejects USB thumb drive in SPICE guest using remote-viewer
Summary: USBredir rejects USB thumb drive in SPICE guest using remote-viewer
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: usbredir
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Hans de Goede
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-10 15:09 UTC by Bill Sanford
Modified: 2012-07-12 20:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-12 20:02:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of error message (531.99 KB, image/png)
2012-07-10 15:09 UTC, Bill Sanford
no flags Details
rhel7 qemu log file (35.64 KB, text/x-log)
2012-07-11 18:22 UTC, Bill Sanford
no flags Details

Description Bill Sanford 2012-07-10 15:09:50 UTC
Created attachment 597373 [details]
Screenshot of error message

Description of problem:
USBredir rejects USB thumb drive in SPICE guest when using SPICE GTK and using remote-viewer.

The http://pastebin.test.redhat.com/96330 has the ps -ax | grep qemu output. 

Version-Release number of selected component (if applicable):
RHEL-7.0-20120709.0

How reproducible:
100%

Steps to Reproduce:
1. Start Virt-manager and add "Redirected USB" to the VM along with "Display Spice" and "Video" of QXL.
2. Start remote-viewer from terminal window (remote-viewer spice://<HOST_IP>?port=<PORT_IP>
3.
  
Actual results:
USB gets rejected by host

Expected results:
USB doesn't get rejected by host

Additional info:

Comment 1 Bill Sanford 2012-07-11 18:22:26 UTC
Created attachment 597648 [details]
rhel7 qemu log file

Comment 2 Hans de Goede 2012-07-12 09:13:54 UTC
Hi,

Looking at the qemu cmdline the problem is that you've not chanegd the usb controller type from the default usb-1 controller to a usb-2 controller. The qemu log confirms this:

qemu-kvm: Warning: speed mismatch trying to attach usb device USB Redirection Device to bus usb.0

So qemu refuses the redirected device since you're trying to plug a USB-2 device into a USB-1 (virtual) controller.

To fix this, start virt-manager, go to the details view of the vm and change the model of the "Controller USB" device to "USB 2"

That should fix things, if for some reason that does not help, you can try following the manual
instructions for adding usbredir support to a libvirt managed vm here:
http://hansdegoede.livejournal.com/11084.html

I'm going to close this as notabug under the assumption that changing the control model fixes things, if it does not please re-open.

Regards,

Hans

p.s.

If you want to redirect more then 1 device at the same time you will need to add more "USB Redirection" devices (up to a maximum of 5, 6 if you remove the tablet which you can do safely if you're using the spice agent inside the guest).

Comment 3 Bill Sanford 2012-07-12 13:26:19 UTC
When I change the "Controller USB" device to "USB 2" I get an dialog box with:

Authetication Required

Privileges are required for low level USB device access (for usb device pass through).

About a second after, I get the USB storage seen locally and not in the guest.

Comment 4 Hans de Goede 2012-07-12 14:47:59 UTC
(In reply to comment #3)
> When I change the "Controller USB" device to "USB 2" I get an dialog box
> with:
> 
> Authetication Required
> 
> Privileges are required for low level USB device access (for usb device pass
> through).

Good, that is expected, usbredir needs raw usb device access, bypassing things like file
system access setting on usb devices, etc. So by default the policykit policy for it requires
root authentication, so in that dialog enter your root password, or if you're part of the wheel
group your own password. You only need to give your password once per remote-viewer
session.

See this blog post for instructions to change the default policy so that no authentication
is required: 
http://hansdegoede.livejournal.com/11936.html


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