guest: Add USB input devices to pSeries guests with graphics
libvirt already does this for us, sort of: it will automatically add a USB keyboard and mouse to ppc64 guests with graphics; in addition, these devices are impossible to remove. Unfortunately this results in a pretty poor experience for the user, since the relative pointing device makes interacting with the GUI an exercise in frustration. As of commit 186bb479d0f4, libvirt will still add the USB keyboard automatically but will skip the USB mouse if a USB tablet is already present, so by explicitly including USB input devices in the generated XML we can create guests that are actually usable. We can do this unconditionally, without having to worry about what version of libvirt we're running against: if it's new enough we'll take advantage of the fix, and if not then the resulting guest will not be any more broken than it would have been before. https://bugzilla.redhat.com/show_bug.cgi?id=1683609 Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
6a24a2a13a
commit
5dad99216e
|
@ -32,6 +32,8 @@
|
|||
<source mode="bind"/>
|
||||
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
</channel>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<input type="keyboard" bus="usb"/>
|
||||
<graphics type="vnc" port="-1"/>
|
||||
<video>
|
||||
<model type="vga"/>
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
<channel type="spicevmc">
|
||||
<target type="virtio" name="com.redhat.spice.0"/>
|
||||
</channel>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<input type="keyboard" bus="usb"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
|
||||
<image compression="off"/>
|
||||
</graphics>
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
<channel type="spicevmc">
|
||||
<target type="virtio" name="com.redhat.spice.0"/>
|
||||
</channel>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<input type="keyboard" bus="usb"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
|
||||
<image compression="off"/>
|
||||
</graphics>
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
<source mode="bind"/>
|
||||
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
</channel>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<input type="keyboard" bus="usb"/>
|
||||
<graphics type="vnc" port="-1"/>
|
||||
<video>
|
||||
<model type="vga"/>
|
||||
|
|
|
@ -714,7 +714,7 @@ class Guest(XMLBuilder):
|
|||
usb_keyboard = False
|
||||
if self.os.is_x86() and not self.os.is_xenpv():
|
||||
usb_tablet = self.osinfo.supports_usbtablet()
|
||||
if self.os.is_arm_machvirt():
|
||||
if self.os.is_arm_machvirt() or self.os.is_pseries():
|
||||
usb_tablet = True
|
||||
usb_keyboard = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue