Commit 5b062a58 authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Guido Trotter

Add -usbdevice tablet to KVM when using vnc

When using VNC, it is recommended to use a tablet-style
input device instead of a mouse. This allows most VNC viewers
to send proper mouse coordinates to the virtual machine's desktop
resulting in perfectly aligned guest and host mouse pointers.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent aa0b600b
......@@ -497,6 +497,10 @@ class KVMHypervisor(hv_base.BaseHypervisor):
vnc_arg = 'unix:%s/%s.vnc' % (vnc_bind_address, instance.name)
kvm_cmd.extend(['-vnc', vnc_arg])
# Also add a tablet USB device to act as a mouse
# This solves various mouse alignment issues
kvm_cmd.extend(['-usbdevice', 'tablet'])
else:
kvm_cmd.extend(['-nographic'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment