mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-27 14:03:57 +03:00
5dad99216e
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>
46 lines
1.4 KiB
XML
46 lines
1.4 KiB
XML
<domain type="kvm">
|
|
<name>foobar</name>
|
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
|
<metadata>
|
|
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
|
<libosinfo:os id="http://fedoraproject.org/fedora/29"/>
|
|
</libosinfo:libosinfo>
|
|
</metadata>
|
|
<memory>65536</memory>
|
|
<currentMemory>65536</currentMemory>
|
|
<vcpu>1</vcpu>
|
|
<os>
|
|
<type arch="ppc64le" machine="pseries">hvm</type>
|
|
<boot dev="hd"/>
|
|
</os>
|
|
<clock offset="utc"/>
|
|
<devices>
|
|
<emulator>/usr/libexec/qemu-kvm</emulator>
|
|
<disk type="file" device="disk">
|
|
<driver name="qemu" type="qcow2"/>
|
|
<source file="/dev/default-pool/testvol1.img"/>
|
|
<target dev="vda" bus="virtio"/>
|
|
</disk>
|
|
<controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
|
<interface type="bridge">
|
|
<source bridge="eth0"/>
|
|
<mac address="00:11:22:33:44:55"/>
|
|
<model type="virtio"/>
|
|
</interface>
|
|
<console type="pty"/>
|
|
<channel type="unix">
|
|
<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"/>
|
|
</video>
|
|
<rng model="virtio">
|
|
<backend model="random">/dev/urandom</backend>
|
|
</rng>
|
|
</devices>
|
|
</domain>
|