We needed to revert commit 5b062a58ac76b39c2dc6a7e1543affdf43dc7ee7
because it was in conflict with the usb_mouse hv parameter. Here we
reintroduce its functionality only when usb_mouse is not specified.

Signed-off-by: Guido Trotter <[email protected]>
---
 lib/hypervisor/hv_kvm.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index 748eb5d..f6520a9 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -508,11 +508,14 @@ class KVMHypervisor(hv_base.BaseHypervisor):
       kvm_cmd.extend(['-append', ' '.join(root_append)])
 
     mouse_type = hvp[constants.HV_USB_MOUSE]
+    vnc_bind_address = hvp[constants.HV_VNC_BIND_ADDRESS]
+
     if mouse_type:
       kvm_cmd.extend(['-usb'])
       kvm_cmd.extend(['-usbdevice', mouse_type])
+    elif vnc_bind_address:
+      kvm_cmd.extend(['-usbdevice', constants.HT_MOUSE_TABLET])
 
-    vnc_bind_address = hvp[constants.HV_VNC_BIND_ADDRESS]
     if vnc_bind_address:
       if utils.IsValidIP(vnc_bind_address):
         if instance.network_port > constants.VNC_BASE_PORT:
-- 
1.7.1

Reply via email to