Add XML support for grab_all,repeat=on to passthrough input devices
Goal
Add support for grab_all,repeat=on
to the XML for passthrough input devices.
Technical details
The current recommendation in many places, including reddit.com/r/VFIO and the Arch Linux wiki, for sharing a keyboard and mouse with a virtual machine is to add qemu:args
to the XML for the virtual machine and to whitelist those devices in the cgroup_device_acl
list in qemu.conf
. This leaves the devices invisible to libvirt
and forces users to alter settings they would otherwise not need to touch and may not be relevant to their particular system.
The XML format currently supports passthrough input devices using the following syntax:
<input type='passthrough' bus='virtio'>
<source evdev='/dev/input/XXX'/>
</input>
However, this does not allow QEMU to toggle between the guest and host as it doesn't currently support grab_all=on,repeat=on
which is required by QEMU in order to toggle using KEY_LEFTCTRL + KEY_RIGHTCTRL