Bug 1001999 - [RFE] USB Redirection device options in virt-install
[RFE] USB Redirection device options in virt-install
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst (Show other bugs)
6.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Giuseppe Scrivano
Virtualization Bugs
: FutureFeature
Depends On:
Blocks: 807277 964215 1031775
  Show dependency treegraph
 
Reported: 2013-08-28 05:48 EDT by Martin Kletzander
Modified: 2014-10-14 02:23 EDT (History)
11 users (show)

See Also:
Fixed In Version: python-virtinst-0.600.0-23.el6
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 964215
Environment:
Last Closed: 2014-10-14 02:23:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 10 tingting zheng 2014-06-03 03:09:02 EDT
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 02:23:37 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.

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.