04.02.2022 05:49, MichaIng wrote:
Package: qemu-guest-agent
Version: 1:5.2+dfsg-11+deb11u1
When using qemu-guest-agent within a Proxmox VM running Debian Bullseye, we recognised that sending the shutdown command from the host only has any
effect when systemd-logind run within the VM and hence dbus is installed. The latter is a native requirement for systemd-logind, which hence seems to
be the now used by qemu-guest-agent to trigger the VM shutdown.
Um. I never used qga myself, and haven't looked at its development/changes.
After a very quick look at the sources, I see both traditional SysV
powerdown calls and systemd calls, - qga should somehow determine which
one to use.
This was not the case with Debian Buster and qemu-guest-agent 1:3.1. Is this an expected change, or maybe also a matter of the build or runtime
configuration? I couldn't find a related QEMU changelog entry.
As far as I can tell, there's no build option(s) to control that.
If it is required now, I guess systemd and dbus should be added as dependencies to qemu-guest-agent, given that the VM shutdown without direct console
access is a major feature and reason to install qemu-guest-agent? Though this would be a huge dependency, hence I'm wondering whether alternatives
without systemd are possible, either with different build flags or other setup or config changes within the VM.
I think your best course is to try to figure out what's actually
going on at your side. I'd use strace on qga to see what it is
doing, for a start.
Also there's a new qemu version out there (6.2) with new qga, -
maybe this one works better (it is in bpo).
Thanks,
/mjt