Bug 1085318 - Can't redirect tcp type USB device
Summary: Can't redirect tcp type USB device
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: usbredir
Version: 6.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: SPICE QE bug list
Depends On: 1005015
Blocks: 807277
TreeView+ depends on / blocked
Reported: 2014-04-08 11:20 UTC by Ján Tomko
Modified: 2015-07-22 07:19 UTC (History)
15 users (show)

Fixed In Version: usbredir-0.5.1-2.el6
Doc Type: Bug Fix
Doc Text:
Previously, USB redirection over plain Transmission Control Protocol (TCP) sockets with the usbredir packages installed did not work. The USB was not properly redirected in this situation, even though USB redirection over Spice channels worked as expected. This update fixes a bug in the usbredir protocol parser that was causing this problem. As a result, USB redirection over plain TCP sockets now works as expected.
Clone Of: 1005015
Last Closed: 2015-07-22 07:19:14 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1381 0 normal SHIPPED_LIVE usbredir bug fix update 2015-07-20 18:07:45 UTC

Description Ján Tomko 2014-04-08 11:20:59 UTC
Also reproducible on RHEL-6.5:

# /usr/libexec/qemu-kvm -enable-kvm -m 1024 -vnc -device  ich9-usb-ehci1,id=usb,bus=pci.0 -chardev socket,id=charredir0,host=,port=4000 -device usb-redir,chardev=charredir0,id=redir0,debug=6 /home/f19.iso 
qemu-kvm: usb-redir warning: chardev_can_read called on non open chardev!

qemu-kvm: usb-redir: chardev open

qemu-kvm: usb-redir: removing 0 packet-ids from cancelled queue

qemu-kvm: usb-redir: removing 0 packet-ids from already-in-flight queue

qemu-kvm: usb-redir: creating usbredirparser

qemu-kvm: usbredirparser: Peer version: usbredirserver 0.5.1, using 64-bits ids

qemu-kvm: usbredirparser: error invalid packet length: 5

+++ This bug was initially created as a clone of Bug #1005015 +++

Description of problem:
Can't redirect tcp type USB device

Version-Release number of selected component (if applicable):
# rpm -qa libvirt virt-manager usbredir

How reproducible:

Steps to Reproduce:
1.Plug in a usb device on host with usbredir packages installed.
# lsusb
Bus 006 Device 003: ID 15e1:2007 RSA RSA SecurID (R) Authenticator
# usbredirserver -p 4000 15e1:2007

2. Configure the guest with Redirected USB Device in virt-manager, 
Add Hardware-> USB Redirection-> type: tcp, Address:&IP_of_HostA.4000
andUSB Controller, Type: USB, Model: USB2.

3. On host A 
# usbredirserver -p 4000 15e1:2007
usbredirparser: Peer version: qemu usb-redir guest 1.5.2, using 64-bits ids

4. Check the usb device in rhel guest with lsusb.
# ps -aux | grep qemu
qemu      2731 29.2  8.2 1676076 647532 ?      Sl   18:52   1:23 /usr/libexec/qemu-kvm -name T2 ... -chardev socket,id=charredir0,host=,port=4000 -device usb-redir,chardev=charredir0,id=redir0

  Check the usb device in Windows guest in my computer. 
#ps -aux | grep qemu
  qemu      5056 33.2 13.7 1513628 1077500 ?     Sl   19:26   0:31 /usr/libexec/qemu-kvm -name xp -S -machine ... -chardev socket,id=charredir0,host=,port=4000 -device usb-redir,chardev=charredir0,id=redir0 

Actual results:
Steps4,  The USB device is not redirected into the rhel guest and can get the usb info by lsusb. 
         The USB device is not shown in my computer of the windows guest. But from the qemu line I can see the info.

Expected results:
Steps4,  The USB device is redirected into the guest and the usb device is available to use.

--- Additional comment from Hans de Goede on 2013-09-06 12:02:45 CEST ---

This is fixed by this upstream commit:

Comment 2 Marc-Andre Lureau 2014-12-15 12:32:25 UTC
I guess we can safely cherry-pick the fix in rhel6? moving to POST

Comment 3 Hans de Goede 2014-12-15 12:53:55 UTC
(In reply to Marc-Andre Lureau from comment #2)
> I guess we can safely cherry-pick the fix in rhel6? moving to POST

Yes cherry-picking the patch should work fine.

Comment 4 Hans de Goede 2015-03-02 10:39:38 UTC
This is fixed in usbredir-0.5.1-2.el6, moving to MODIFIED.

Comment 6 Bill Sanford 2015-03-26 13:48:31 UTC
Verified with RHEL-6.7-20150304.0 and usbredir-server-0.5.1-2.el6.x86_64

Comment 8 errata-xmlrpc 2015-07-22 07:19:14 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.


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