[vfio-users] VM loses mouse

Patrick O'Callaghan poc at usb.ve
Mon May 1 12:58:37 UTC 2017


On Mon, 2017-05-01 at 13:50 +0100, Patrick O'Callaghan wrote:
> On Mon, 2017-05-01 at 15:34 +0300, Zycorax Tokoroa wrote:
> > > OK, I did the following:
> > > 
> > > * Added the 'qemu' user to the 'input' group.
> > > * Edited /etc/libvirt/qemu.conf to add the evdev devices
> > > * Restarted libvirtd
> > > 
> > > I still get the same error.
> > > 
> > > poc
> > > 
> > 
> > 
> > - Check the ownership of the /dev/input/ devices matches what I've seen
> > in my experience (root:input).
> 
> It does.
> 
> > - Note that the user VMs are run as is "libvirt-qemu", not just "qemu",
> > at least in the systems I've worked with. If your distribution uses a
> > different user, this can be found by running a simple dummy VM.
> 
> There is no libvirt-qemu user. VMs run as 'qemu'. This is Fedora 25.
> 
> > - Note that /dev/input/ aren't guaranteed to always be the same with
> > every host boot. /dev/input/by-id/ should grant a non-changing name, iirc.
> 
> That's what I'm using (my earlier example used 'eventX' but changing it
> to /dev/input/by-id makes no difference).
> 
> > Alternatively to the two first points, you could set the ownership of
> > the devices involved to libvirt-qemu before launching the VM.
> 
> Tried that. No change.
> 
> poc

I tried turning off SElinux and got a different message:

Error starting domain: internal error: process exited while connecting
to monitor: 2017-05-01T12:56:25.296858Z qemu-system-x86_64: -object
input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_USB_Receiver-
if02-mouse: /dev/input/by-id/usb-Logitech_USB_Receiver-if02-mouse: is
not an evdev device

This means that a) the permission problems are related to SElinux, and
b) there is something wrong with the evdev setup.

poc




More information about the vfio-users mailing list