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 1001999 - [RFE] USB Redirection device options in virt-install
Summary: [RFE] USB Redirection device options in virt-install
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 807277 964215 1031775
TreeView+ depends on / blocked
 
Reported: 2013-08-28 09:48 UTC by Martin Kletzander
Modified: 2018-12-09 17:09 UTC (History)
11 users (show)

Fixed In Version: python-virtinst-0.600.0-23.el6
Doc Type: Enhancement
Doc Text:
Clone Of: 964215
Environment:
Last Closed: 2014-10-14 06:23:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1444 0 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2014-10-14 01:05:50 UTC

Comment 10 tingting zheng 2014-06-03 07:09:02 UTC
Tested the bug with:
virt-manager-0.9.0-25.el6.x86_64
python-virtinst-0.600.0-24.el6.noarch

Steps:
1.Check virt-install manual,--dredirdev has been added there.

       --redirdev=BUS[,OPTS]
         Add a redirected device.

         type
             The redirection type, currently supported is tcp or spicevmc.

         server
             The TCP server connection details, of the form ’server:port’.

         Examples of invocation:

         --redirdev usb,type=tcp,server=localhost:4000
             Add a USB redirected device provided by the TCP server on ’localhost’ port 4000.

         --redirdev usb,type=spicevmc
             Add a USB device redirected via a dedicated Spice channel.

2.Use virt-install to set USB Redirection device options:
# virt-install -n usbtest -r 1024 --disk /var/lib/libvirt/images/rhel6.5-clone.img --import --graphics spice --video qxl --channel spicevmc --redirdev usb,type=spicevmc

Starting install...
Creating domain... 

3. Check the xml file of the guest,it adds usb2 controllers by default.
# virsh dumpxml usbtest
   <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
    </controller>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
    </redirdev>

4. Plug a usb disk on host,from virt-viewer console,the usb disk can be redirected successfully to guest.

5. Repeat the above steps to try usb redirection with tcp type.
# usbredirserver -p 5000 0951:1656
usbredirparser: Peer version: qemu usb-redir guest 0.12.1, using 64-bits ids

# virt-install -n usbtest -r 1024 --disk /var/lib/libvirt/images/rhel6.5-clone.img --import --graphics spice --video qxl --channel spicevmc --redirdev usb,type=tcp,server=localhost:5000

Starting install...
Creating domain...                                                                                     |    0 B     00:00     

#virsh dumpxml usbtest
   <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
    </controller>
    <redirdev bus='usb' type='tcp'>
      <source mode='connect' host='localhost' service='5000'/>
      <protocol type='raw'/>
      <alias name='redir0'/>
    </redirdev>

As there are bugs 807277 and 1085318 to track usb redirection issues,option --redirdev in virt-install has been added and worked successfully,so move the bug to VERIFIED.

Comment 11 errata-xmlrpc 2014-10-14 06:23:37 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.

http://rhn.redhat.com/errata/RHBA-2014-1444.html


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