virt-manager/1d2cd306-Fix-incorrect-usage-of-virtio-input.patch
Charles Arnold 287c87ccd9 - bsc#1022173 - virt-manager: unknown input device type
'virtio1.0-input'
  1d2cd306-Fix-incorrect-usage-of-virtio-input.patch
- bsc#1005848 - KVM: guest can not be started on top of SLES12SP1
  KVM host ppc64
  5a11cf07-virt-manager-generates-invalid-guest-XML.patch
- Upstream bug fixes
  617b9271-dont-return-virtio1.0-net-as-valid-device-name.patch
  7962672c-fix-error-checking-extra_args.patch
  b4858842-fix-bad-version-check-regression.patch
  f07a3021-fix-wait-to-behave-like-noautoconsole.patch

- bsc#1005861 - virt-manager create new machine dialog box too
  small to display system type
  virtinst-expand-combobox.patch
- fate#314135: Support PVSCSI on XEN and VirtioSCSI on KVM -
- fate#313076: HBA passthrough for kvm

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=338
2017-01-27 15:42:58 +00:00

79 lines
2.9 KiB
Diff

Subject: osdict: Fix incorrect usage of virtio input
From: Cole Robinson crobinso@redhat.com Fri Jul 29 13:17:36 2016 -0400
Date: Fri Jul 29 13:17:36 2016 -0400:
Git: 1d2cd306773064258f5d02c980b09a683ae77798
Regression reported with latest libosinfo, when the OS reports
virtio-input support:
http://www.redhat.com/archives/virt-tools-list/2016-July/msg00109.html
Really our code presently only cares about the USB tablet, so adjust
our libosinfo lookup to explicitly check for it
Index: virt-manager-1.4.0/virtinst/guest.py
===================================================================
--- virt-manager-1.4.0.orig/virtinst/guest.py
+++ virt-manager-1.4.0/virtinst/guest.py
@@ -1033,15 +1033,14 @@ class Guest(XMLBuilder):
return False
return all([c.model == "none" for c in controllers])
- input_type = self._os_object.default_inputtype()
- input_bus = self._os_object.default_inputbus()
+ input_type = "mouse"
+ input_bus = "ps2"
if self.os.is_xenpv():
input_type = VirtualInputDevice.TYPE_MOUSE
input_bus = VirtualInputDevice.BUS_XEN
- elif _usb_disabled() and input_bus == "usb":
- input_bus = "ps2"
- if input_type == "tablet":
- input_type = "mouse"
+ elif self._os_object.supports_usbtablet() and not _usb_disabled():
+ input_type = "tablet"
+ input_bus = "usb"
for inp in self.get_devices("input"):
if (inp.type == inp.TYPE_DEFAULT and
Index: virt-manager-1.4.0/virtinst/osdict.py
===================================================================
--- virt-manager-1.4.0.orig/virtinst/osdict.py
+++ virt-manager-1.4.0/virtinst/osdict.py
@@ -457,23 +457,19 @@ class _OsVariant(object):
return devname
return None
- def default_inputtype(self):
- if self._os:
- fltr = libosinfo.Filter()
- fltr.add_constraint("class", "input")
- devs = self._os.get_all_devices(fltr)
- if devs.get_length():
- return devs.get_nth(0).get_name()
- return "mouse"
+ def supports_usbtablet(self):
+ if not self._os:
+ return False
- def default_inputbus(self):
- if self._os:
- fltr = libosinfo.Filter()
- fltr.add_constraint("class", "input")
- devs = self._os.get_all_devices(fltr)
- if devs.get_length():
- return devs.get_nth(0).get_bus_type()
- return "ps2"
+ fltr = libosinfo.Filter()
+ fltr.add_constraint("class", "input")
+ fltr.add_constraint("name", "tablet")
+ devs = self._os.get_all_devices(fltr)
+ for idx in range(devs.get_length()):
+ dev = devs.get_nth(idx)
+ if devs.get_nth(idx).get_bus_type() == "usb":
+ return True
+ return False
def supports_virtiodisk(self):
if self._os: