Bug 867324

Summary: USB tablet changes to USB mouse after migration
Product: Red Hat Enterprise Linux 6 Reporter: Qunfang Zhang <qzhang>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, areis, bsarathy, dyasny, flang, juzhang, michen, mkenneth, owasserm, quintela, qzhou, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-22 06:35:30 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:

Description Qunfang Zhang 2012-10-17 10:16:59 UTC
Description of problem:
Boot a guest with both usb-tablet and usb-mouse, and the guest will use usb tablet. Mouse can get inside and outside guest desktop freely. But after migration to another host, the mouse switches to usb mouse and the mouse point it grabbed.

Version-Release number of selected component (if applicable):
kernel-2.6.32-331.el6.x86_64
qemu-kvm-0.12.1.2-2.327.el6.x86_64
spice-server-0.12.0-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Boot guest with both usb tablet and usb mouse.
# /usr/libexec/qemu-kvm ... -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0  -device  usb-hub,bus=usb.0,port=2,id=hub -device usb-storage,bus=usb.0,port=2.4,drive=drive-usb-2-0,id=usb-2-0,removable=on  -drive file=/mnt/usb.qcow2,if=none,id=drive-usb-2-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads -device usb-kbd,id=kbd,port=2.1 -device usb-mouse,id=mouse,port=2.2 

2.(qemu) info usb
  Device 0.0, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.0, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.0, Port 2.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 2.1, Speed 12 Mb/s, Product QEMU USB Keyboard
  Device 0.0, Port 2.2, Speed 12 Mb/s, Product QEMU USB Mouse

3.(qemu) info mice
* Mouse #1: QEMU USB Tablet
  Mouse #2: QEMU USB Mouse
  Mouse #0: QEMU PS/2 Mouse

4. Boot the guest on another host with listening mode 

5. Migrate guest to dst host.

6. Check usb mouse after migration.
(qemu) info mice
* Mouse #2: QEMU USB Mouse
  Mouse #1: QEMU USB Tablet
  Mouse #0: QEMU PS/2 Mouse

  
Actual results:
USB tablet changes to USB mouse after migration

Expected results:
Still use usb tablet.

Additional info:

Comment 1 Gerd Hoffmann 2012-10-22 06:35:30 UTC
Don't add both usb mouse and tablet.  If you want a tablet, add a tablet only.

If you have both it isn't predictable which will actually be used, it is pure luck it worked as expected before migration.