Hide Forgot
Description libvirt wrong parse of usbredir alias name Version: libvirt-0.10.2-29.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a guest. 2.Use virsh edit guest to add usbredir devices,added part as below show: <redirdev bus='usb' type='tcp'> <source mode='connect' host='localhost' service='4000'/> <protocol type='raw'/> <alias name='redir0'/> </redirdev> 3.Save the update,error shows: error: An error occurred, but the cause is unknown Failed. Try again? [y,n,f,?]: 4.If I remove the alias part from xml,no error shows. Actual results: As step 3 describes. Expected results: libvirt can parse the alias name of usbredir device. Additional info: 1.The issue block migration of guests with usbredir devices. # virsh migrate --live mig qemu+ssh://$ip/system root@$ip's password: error: An error occurred, but the cause is unknown 2.The issue can not be reproduced on rhel7.
This has been fixed upstream as a part of commit cc244e24416b7785258c69995483015bbf8927dd CommitDate: 2012-11-21 17:54:35 +0100 conf: add support for booting from redirected USB devices Commit a4c19459aa8634c43b51e8138fb1d7eec4c17824 only added the QEMU capability flag, command line option and added the boot element for redirdev's in the XML schema. This patch adds support for parsing and writing the XML with redirdevs with the boot flag. It also ignores unknown XML elements in redirdev instead of failing with: "error: An error occurred, but the cause is unknown" Bug: https://bugzilla.redhat.com/show_bug.cgi?id=805414 git describe: v1.0.0-91-gcc244e2 contains: v1.0.1-rc1~226
I can reproduce this with package: libvirt-0.10.2-32.el6.x86_64 verify with : libvirt-0.10.2-33.el6.x86_64 verify steps: 1.Prepare a guest. 2.Plug in a usb device on host with usbredir packages installed. # lsusb Bus 002 Device 007: ID 058f:6387 Alcor Micro Corp. Flash Drive # usbredirserver -p 4000 058f:6387 3.Use virsh edit guest to add usbredir devices,added part as below show: <redirdev bus='usb' type='tcp'> <source mode='connect' host='localhost' service='4000'/> <protocol type='raw'/> <alias name='redir0'/> </redirdev> 3.Save the update, no error shows: # virsh edit rr66 Domain rr66 XML configuration edited. 4.boot the guest and check: # virsh dumpxml rr66 |grep -A6 redirdev <redirdev bus='usb' type='tcp'> <source mode='connect' host='localhost' service='4000'/> <protocol type='raw'/> <alias name='redir0'/> </redirdev> libvirt can parse the alias name of usbredir device correctly,so set as 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-1374.html