Installing QEMU Guest Agent on CachyOS
Install the QEMU Guest Agent on a CachyOS virtual machine to enable graceful shutdown, disk freezing during backups, and clock resync on an Unraid host with passthrough.
The QEMU Guest Agent is a helper daemon that runs inside a virtual machine to allow direct communication and command execution between the hypervisor host and the guest operating system.
On Unraid, the required virtio channel (org.qemu.guest_agent.0) is added to the VM's XML automatically, so no host-side configuration is needed. Just install the agent in the guest.
sudo pacman -S qemu-guest-agent
sudo systemctl enable --now qemu-guest-agent.service
sudo systemctl status qemu-guest-agent.service
To verify the host can actually communicate with the guest, run this from the Unraid terminal:virsh qemu-agent-command <vm-name> '{"execute":"guest-ping"}'
A return of {"return":{}} confirms the channel is working end to end. Note that systemctl status alone only proves the daemon is running inside the guest; the ping proves the host can reach it.
Why this matters on a passthrough VM:
- Graceful shutdown - Unraid's stop button issues a proper
guest-shutdowninstead of relying on ACPI, which a CachyOS VM with GPU passthrough may not handle cleanly. - Consistent disk state - with a passed-through SSD, the agent's
fsfreezesupport lets the host quiesce the filesystem during backups instead of catching it mid-write. - Clock resync after S3 sleep - when the host wakes from S3, the guest clock typically drifts. The agent lets the host correct it with
guest-set-time.
The agent is a host-to-guest command channel by design, but it only listens on the virtio socket; it is not exposed to the network.