Changing runlevel (telinit 3) will stop qemu-guest-agent.service, and it won't ever restart, because it's intended to only start when the specified virtio device is added.
Use IgnoreOnIsolate=True plus Install WantedBy= to keep the agent running regardless of runlevel, which is the expected behavior IMO. This has been in RHEL since 7.2ish timeframe: https://bugzilla.redhat.com/show_bug.cgi?id=1165176 Signed-off-by: Cole Robinson <crobi...@redhat.com> --- contrib/systemd/qemu-guest-agent.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/systemd/qemu-guest-agent.service b/contrib/systemd/qemu-guest-agent.service index 505636a5ba..bb419fe55f 100644 --- a/contrib/systemd/qemu-guest-agent.service +++ b/contrib/systemd/qemu-guest-agent.service @@ -3,6 +3,7 @@ Description=QEMU Guest Agent Documentation=https://wiki.qemu.org/Features/GuestAgent BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device After=dev-virtio\x2dports-org.qemu.guest_agent.0.device +IgnoreOnIsolate=True [Service] ExecStart=/usr/bin/qemu-ga @@ -10,3 +11,4 @@ Restart=always RestartSec=0 [Install] +WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device -- 2.31.1