diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py index 3487d9dfff10a7df8f83c380f5c2972e0d98ff75..c849dba54d819b4eb7724fa4d2824e112c4612e2 100644 --- a/lib/hypervisor/hv_kvm.py +++ b/lib/hypervisor/hv_kvm.py @@ -566,11 +566,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 netutils.IsValidIP4(vnc_bind_address): if instance.network_port > constants.VNC_BASE_PORT: @@ -605,10 +608,6 @@ 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']) diff --git a/man/gnt-cluster.sgml b/man/gnt-cluster.sgml index c58e1aef5528ede2a83fbffa546b6ab7e0b813c7..b4ad6d8cd3e9b0f106c2339b1bec7eba3496612f 100644 --- a/man/gnt-cluster.sgml +++ b/man/gnt-cluster.sgml @@ -228,7 +228,7 @@ <sbr> <arg>-g <replaceable>vg-name</replaceable></arg> <sbr> - <arg>--master-netdev <replaceable>vg-name</replaceable></arg> + <arg>--master-netdev <replaceable>interface-name</replaceable></arg> <sbr> <arg>-m <replaceable>mac-prefix</replaceable></arg> <sbr> diff --git a/man/gnt-instance.sgml b/man/gnt-instance.sgml index 2935cf0009a81f1c45cde983c39bbaefefe797dc..f4d2f54212f728b0f7d99ea787ee181683b9fe5f 100644 --- a/man/gnt-instance.sgml +++ b/man/gnt-instance.sgml @@ -729,6 +729,18 @@ </listitem> </varlistentry> + <varlistentry> + <term>usb_mouse</term> + <listitem> + <simpara>Valid for the KVM hypervisor.</simpara> + + <simpara>This option specifies the usb mouse type to be used. + It can be <quote>mouse</quote> or <quote>tablet</quote>. When + using VNC it's recommended to set it to <quote>tablet</quote>. + </simpara> + </listitem> + </varlistentry> + </variablelist> </para>