Bug 1035529

Summary: Stable guest ABI doesn't check redirected usb device
Product: Red Hat Enterprise Linux 6 Reporter: tingting zheng <tzheng>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: dyuan, lcui, lsu, mzhan, rbalakri, tzheng, xuzhang
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.10.2-33.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1035128 Environment:
Last Closed: 2014-10-14 04:18:49 UTC Type: Bug
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: 1035128    
Bug Blocks:    

Comment 1 Ján Tomko 2014-04-03 13:25:56 UTC
Fixed upstream by:
commit c9123fbe85430dab5e737b20f5657aab650a5d45
Author:     Ján Tomko <jtomko>
CommitDate: 2014-04-03 15:21:38 +0200

    Add redirdevs to ABI stability check
    
    Check the bus, type of the source device (tcp vs. spicevmc)
    and the device address visible in the guest.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1035128

git describe: v1.2.3-38-gc9123fb

Comment 5 tingting zheng 2014-04-17 07:38:46 UTC
Tested pass with:
libvirt-0.10.2-33.el6.x86_64

Steps:
1.Prepare a guest.
2.Plug in a usb device on host with usbredir packages installed.
# lsusb
Bus 002 Device 002: ID 0951:1625 Kingston Technology DataTraveler 101 II
 
# usbredirserver -p 4000 0951:1625

3. Configure the guest with Redirected USB Device with tcp type.

4. Boot the guest.

5.Use virsh dumpxml to get the xml of the guest.
# virsh dumpxml mig > mig.xml
……
    <redirdev bus='usb' type='tcp'>
      <source mode='connect' host='$ip' service='4000'/>
      <protocol type='raw'/>
    </redirdev>
……

6.Change the type in xml from 'tcp' to 'spicevmc'.
change xml from:
    <redirdev bus='usb' type='tcp'>
      <source mode='connect' host='$ip' service='4000'/>
      <protocol type='raw'/>
    </redirdev>
to:
    <redirdev bus='usb' type='spicevmc'>
      <source mode='connect' host='$ip' service='4000'/>
      <protocol type='raw'/>
    </redirdev>

7.Do migrate,error shows:
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml
error: unsupported configuration: Target redirected device source type spicevmc does not match source device source type tcp

8.Edit in xml to add one more usb redirdev,add the below part in mig.xml:
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
    </redirdev>

9.Do migrate,error shows:
# virsh migrate --live mig qemu+ssh://$ip/system --xml mig.xml
error: unsupported configuration: Target domain redirected devices count 2 does not match source 1

Refer to the above comments,move the bug to VERIFIED.

Comment 7 errata-xmlrpc 2014-10-14 04:18:49 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-1374.html