Discussion:
KVM/QEMU/libvirt, and automatically release mouse pointer in Debian guest
(too old to reply)
Jeffrey Walton
2024-07-29 04:20:01 UTC
Permalink
Hi Everyone,

I have KVM/QEMU/libvirt installed to manage my VMs. I have a Debian 12
guest, x86_64, fully patched. The Debian guest has qemu-guest-agent
installed. The qemu-guest-agent service is running on the Debian
guest.

The problem is, the Debian guest does not automatically release the
mouse. I have to tap the right CTRL key.

My question is, what else needs to be done to automatically release
the mouse pointer in the Debian guest?

-----

$ sudo systemctl start qemu-guest-agent
$ sudo systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static)
Active: active (running) since Mon 2024-07-29 00:01:39 EDT; 9min ago
Main PID: 574 (qemu-ga)
Tasks: 2 (limit: 4589)
Memory: 1.2M
CPU: 2ms
CGroup: /system.slice/qemu-guest-agent.service
└─574 /usr/sbin/qemu-ga

Jul 29 00:01:39 debian12-x64 systemd[1]: Started qemu-guest-agent.service ...

-----

Thanks in advance,

Jeff
didier gaumet
2024-07-29 08:20:02 UTC
Permalink
Post by Jeffrey Walton
Hi Everyone,
I have KVM/QEMU/libvirt installed to manage my VMs. I have a Debian 12
guest, x86_64, fully patched. The Debian guest has qemu-guest-agent
installed. The qemu-guest-agent service is running on the Debian
guest.
The problem is, the Debian guest does not automatically release the
mouse. I have to tap the right CTRL key.
[...]

Hello,

(I do not use kvm/qemu/libvirt by invoking qemu directly but thru
virt-manager, so I am mostly ignorant about qemu direct invocation)

Perhaps the observed behavior is due to parameters missing when you
launch qemu?
For example vmport and spice options (I don't know if the desired
behavior can be obtained via vnc instead of spice).
See "Running qemu manually" in the Spice client doc here:
https://www.spice-space.org/spice-user-manual.html#spice-client
George at Clug
2024-07-30 00:10:01 UTC
Permalink
Post by Jeffrey Walton
Hi Everyone,
I have KVM/QEMU/libvirt installed to manage my VMs. I have a Debian 12
guest, x86_64, fully patched. The Debian guest has qemu-guest-agent
installed. The qemu-guest-agent service is running on the Debian
guest.
The problem is, the Debian guest does not automatically release the
mouse. I have to tap the right CTRL key.
My question is, what else needs to be done to automatically release
the mouse pointer in the Debian guest?
Not sure whether you use Spice or VNC to connect to your VMs.

I do not experience the issue you report with GUI enabled VMs, only with VMs that do not have a GUI installed (i.e. headless VMs).

I use Virt-Manager to manage my VMs, I believe Virt-Manager defaults to using Spice, hence I install spice-vdagent on my GUI VMs and on non-GUI VMs I connect from a terminal using ssh.

I hope the above is of some help to you?

George.
Post by Jeffrey Walton
-----
$ sudo systemctl start qemu-guest-agent
$ sudo systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static)
Active: active (running) since Mon 2024-07-29 00:01:39 EDT; 9min ago
Main PID: 574 (qemu-ga)
Tasks: 2 (limit: 4589)
Memory: 1.2M
CPU: 2ms
CGroup: /system.slice/qemu-guest-agent.service
└─574 /usr/sbin/qemu-ga
Jul 29 00:01:39 debian12-x64 systemd[1]: Started qemu-guest-agent.service ...
-----
Thanks in advance,
Jeff
Loading...