Bug 1689815 - libvirt: Can't create ppc64 guests with graphics and no USB mouse
Summary: libvirt: Can't create ppc64 guests with graphics and no USB mouse
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: ppc64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Andrea Bolognani
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1683609 1683681
Blocks: 1624641
TreeView+ depends on / blocked
 
Reported: 2019-03-18 08:30 UTC by Jaroslav Suchanek
Modified: 2019-11-06 07:14 UTC (History)
9 users (show)

Fixed In Version: libvirt-5.3.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1683681
Environment:
Last Closed: 2019-11-06 07:13:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 176859 0 None None None 2019-06-04 07:12:50 UTC
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:14:05 UTC

Description Jaroslav Suchanek 2019-03-18 08:30:55 UTC
+++ This bug was initially created as a clone of Bug #1683681 +++

libvirt will automatically add a USB keyboard / USB mouse combo to
any ppc64 with configured graphics, with no way for the user to opt
out: this is problematic for the reasons detailed in

  https://bugzilla.redhat.com/show_bug.cgi?id=1683609#c2

libvirt should make it possible to create a ppc64 guest with a USB
tablet as its only pointing device.


--- Additional comment from Andrea Bolognani on 2019-03-11 10:05:24 CET ---

Patches merged upstream.

  commit 186bb479d0f409dc75175bea48a760838c479a6c
  Author: Andrea Bolognani <abologna>
  Date:   Wed Feb 27 18:41:35 2019 +0100

    qemu: Allow creating ppc64 guests with graphics and no USB mouse
    
    The existing behavior for ppc64 guests is to always add a USB
    keyboard and mouse combo if graphics are present; unfortunately,
    this means any attempt to use a USB tablet will cause both pointing
    devices to show up in the guest, which in turn will result in poor
    user experience.
    
    We can't just stop adding the USB mouse or start adding a USB tablet
    instead, because existing applications and users might rely on the
    current behavior; however, we can avoid adding the USB mouse if a USB
    tablet is already present, thus allowing users and applications to
    create guests that contain a single pointing device.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1683681
    
    Signed-off-by: Andrea Bolognani <abologna>
    Reviewed-by: Cole Robinson <crobinso>

v5.1.0-170-g186bb479d0

--- Additional comment from IBM Bug Proxy on 2019-03-11 10:14:57 CET ---

------- Comment From sthoufee.com 2019-02-12 01:57 EDT-------
> Removing the usb-mouse device ("-device
> usb-mouse,id=input2,bus=usb.0,port=3") from the qemu command line fixes the
> doubled mouse cursor issue... however, I can't find how to remove it from
> libvirt... I tried using 'virsh edit' and removing the following lines from
> the xml:
>
> <input type='mouse' bus='usb'>
> <alias name='input2'/>
> <address type='usb' bus='0' port='3'/>
> </input>
>
> But libvirt doesn't seem to allow me to remove the default usb-mouse device.
>
> []'s
> Gustavo
>

virsh dumpxml guest-name > guest.xml

Open guest.xml in any text editor

remove this line

<input type='mouse' bus='usb'>
<alias name='input2'/>
<address type='usb' bus='0' port='3'/>
</input>

Enter the following on the command line to update the VM guest configuration:

virsh shutdown guest-name
virsh define guest.xml
virsh start guest-name
virsh dumpxml guest-name > guest.xml and check if <input type='mouse'..> type is removed..

Comment 5 Dan Zheng 2019-05-29 06:41:09 UTC
Packages:
libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.ppc64le
qemu-kvm-4.0.0-3.module+el8.1.0+3265+26c4ed71.ppc64le
kernel-4.18.0-94.el8.ppc64le

Remove usb mouse and usb keyboard, keep graphics and add usb tablet as below
Save the guest.
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>
Check the guest that only usb keyboard is automatically inserted and no usb mouse is inserted.

    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>

Remove the usb tablet  and save. Then usb mouse is inserted.
    <input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <input type='mouse' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>

Comment 6 Dan Zheng 2019-05-29 06:42:10 UTC
Based on test result in comment 5, I verify this bug.

Comment 8 errata-xmlrpc 2019-11-06 07:13:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3723


Note You need to log in before you can comment on or make changes to this bug.