Bug 807277
Summary: | Enable auto-redir in virt-manager | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Grant Williamson <grant_williamson> | ||||||
Component: | virt-manager | Assignee: | Giuseppe Scrivano <gscrivan> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 6.3 | CC: | adevolder, cfergeau, crobinso, cwei, dblechte, gscrivan, hdegoede, jwu, lcui, malittle, marcandre.lureau, mjenner, mkletzan, mzhan, ngalvin, rbalakri, rmcswain, tlavigne, trichard, tzheng, walicki, zpeng | ||||||
Target Milestone: | rc | Flags: | rmcswain:
needinfo?
|
||||||
Target Release: | 6.4 | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | virt-manager-0.9.0-20.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 853317 923567 987763 (view as bug list) | Environment: | |||||||
Last Closed: | 2014-10-14 06:25:26 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 964215, 996459, 1001999, 1031775, 1085318 | ||||||||
Bug Blocks: | 1083163, 782183, 835616, 840699, 853317, 923567, 987763 | ||||||||
Attachments: |
|
Description
Grant Williamson
2012-03-27 12:19:40 UTC
Since this isn't upstream yet, it's a bit late for 6.3 cycle. Deferring to 6.4 If a patch were to be created, we would be happy to re-spin out own package till 6.4 is released. This RFE is certainly reasonable, so I think the best approach is to engage upstream and submit a patch there. Cole or others can provide review and acks to move the process along. (In reply to comment #5) > This RFE is certainly reasonable, so I think the best approach is to engage > upstream and submit a patch there. Cole or others can provide review and > acks to move the process along. Nathan/Grant, is IBM planning on submitting any code upstream? commit 88f2d1abe0ffecdf606acbf5f473034d858dc6db Author: Guannan Ren <gren> Date: Mon Jul 1 14:33:59 2013 -0400 details: Add auto USB redirection support in console viewer Add "Redirect USB device" option in console viewer. Initialize and embed UsbDeviceWidget object from SpiceClientGtk into a dialog to let user choose available USB devices for redirection. Throw an error message if USB connection failed. Auto-redirection is enable by default. There is race between creating usbredir channel and calling has_usb_redirection() when initializing spice session like happening on virt-viwer. So adding a new signal handler on_details_menu_virtual_manager_activate() to recheck the status of usbredir channel, set "Redirect USB device" option sensitive if it is availiable. commit d6fc079ae88da2433ae257b25e58f48403b78cf7 Author: Guannan Ren <gren> Date: Mon Jul 1 14:33:06 2013 -0400 error: use helper function to embed customized widget into dialog backport patches sent out http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-September/msg00086.html *** Bug 964215 has been marked as a duplicate of this bug. *** Tested with: python-virtinst-0.600.0-20.el6.noarch virt-manager-0.9.0-20.el6.x86_64 Steps: 1. Plug a usb on the host,launch virt-manager,open a guest,Click "Add Hardware"->"USB Redirection"->Type "Spice channel". 2. Open guest console,click "Virtualization"->"Redirect USB device",choose the usb,error shows: USB redirection error <GError at 0x26f74c0> 3.Use lsusb in guest,the usb is not redirected. Refer to the above comments,move the bug to ASSIGNED. I've just tested it again here and it works correctly for me. The error comes from spice-gtk-python. What version of spice-gtk-python are you using? What USB device? Could you try with another USB device? (In reply to Giuseppe Scrivano from comment #46) > I've just tested it again here and it works correctly for me. The error > comes from spice-gtk-python. What version of spice-gtk-python are you > using? What USB device? Could you try with another USB device? # rpm -qa |grep spice-gtk-python spice-gtk-python-0.20-11.el6_5.1.x86_64 # lsusb Bus 002 Device 003: ID 0951:1646 Kingston Technology I tried another usb disk,the same error shows. Created attachment 894539 [details]
spice debug info with virt-manager
thanks for the log. The error seems to come from spice and virt-manager has no control over it: (virt-manager:11356): GSpice-DEBUG: usb-device-manager.c:1291 connecting device 0x371c9a0 (virt-manager:11356): GSpice-DEBUG: channel-usbredir.c:324 usbredir-9:0: connecting usb channel 0x37c8400 (virt-manager:11356): GSpice-DEBUG: channel-usbredir.c:490 usbredir-9:0: usbredirhost: device rejected (virt-manager:11356): GSpice-DEBUG: channel-usbredir.c:683 usbredir-9:0: Kingston DataTraveler 3.0 [0951:1666] at 2-2 rejected by host (virt-manager:11356): GSpice-DEBUG: channel-usbredir.c:397 usbredir-9:0: disconnecting device from usb channel 0x37c8400 (virt-manager:11356): GSpice-DEBUG: channel-usbredir.c:490 usbredir-9:0: usbredirhost: device disconnected 2014-05-11 23:14:19,149 (error:83): dialog message: USB redirection error : USB redirection error Should I reassign or clone this bug to spice-gtk? moving to spice-gtk for further probing... If you connect to the same VM using virt-viewer/remote-viewer, is USB redirection working? (In reply to Christophe Fergeau from comment #54) > If you connect to the same VM using virt-viewer/remote-viewer, is USB > redirection working? # lsusb Bus 002 Device 007: ID 0951:1666 Kingston Technology When I use virt-viewer to connect the same guest,click "File"->"USB device selection",click the usb disk I want to redirect,there is error:'USB redirection error:Kingston DataTraveler 3.0 [0951:1666] at 2-7 rejected by host. could you please attach the XML definition for your VM (virsh dumpxml guest)? Created attachment 898177 [details]
xml file of guest
This XML seems to be missing the needed USB controllers for USB redirection to work, see http://people.freedesktop.org/~teuf/spice-doc/html/ch02s06.html#idm244178574320 . You will also be limited to redirecting one USB device at the same time. (In reply to Christophe Fergeau from comment #58) > This XML seems to be missing the needed USB controllers for USB redirection > to work, see > http://people.freedesktop.org/~teuf/spice-doc/html/ch02s06. > html#idm244178574320 . You will also be limited to redirecting one USB > device at the same time. Yes,my fault,I should add usb controller with model usb2. As virt-manager on rhel6 doesn't support to change for usb2 model,I modify guest xml to add: <controller type='usb' index='0' model='ich9-ehci1'/> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> </controller> Then follow step in comment 45. 1.Plug a usb on the host,launch virt-manager,open a guest,Click "Add Hardware"->"USB Redirection"->Type "Spice channel". 2.Open guest console,click "Virtualization"->"Redirect USB device",choose the usb,the usb disk can be redirected successfully. 3.For "USB Redirection" with type "tcp",there is bug 1085318 which is not fixed,so I will retest the bug with tcp type once the bug is fixed. can you test if the other cases work for you now? (In reply to Giuseppe Scrivano from comment #60) > can you test if the other cases work for you now? Sure. 1.As virt-manager on rhel6 doesn't support to change for usb2 model,I filed a new RFE bug 1100561,since virt-manager GUI provide support USB Redirection,it's useful and convenient to support usb2 model from virt-manager. 2.I modify guest xml to add: <controller type='usb' index='0' model='ich9-ehci1'/> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> </controller> Tested for usb redirection with spice type,both virt-manager and virt-viewer/remote-viewer works well,usb disk can be redirected successfully. Besides usb redirection with tcp type blocked by bug 1085318,If there is something I've missed,pls correct me. as the spice tcp redirection bug is already tracked and it is a known issue, I think we can skip to test it here. (In reply to Giuseppe Scrivano from comment #63) > as the spice tcp redirection bug is already tracked and it is a known issue, > I think we can skip to test it here. So from virt-manager GUI,I can open a guest,Click "Add Hardware"->"USB Redirection"->Type "Spice channel" or "tcp",usb redirection with spice type works well refer to comment 61,from virt-manager side,the bug has been fixed,so I moved the bug to VERIFIED. 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-1447.html |