Ansible Role linuxfabrik.lfops.qemu_guest_agent¶
This role installs the QEMU Guest Agent inside a KVM/QEMU guest. The agent runs as a daemon (qemu-guest-agent.service) and exposes a virtio-serial channel that the hypervisor uses for things the host can't otherwise observe: graceful shutdown, filesystem freeze/thaw for consistent disk snapshots, host-side queries for guest hostname/IP/network info, and time synchronization after a host suspend. Without the agent, hypervisor-side actions like virsh shutdown, snapshot quiescing or virsh domifaddr either fall back to ACPI (less reliable) or simply don't return useful data.
Available since LFOps 2.0.0.
Tags¶
qemu_guest_agent
- Installs
qemu-guest-agentand managesqemu-guest-agent.service. - Triggers: none.
qemu_guest_agent:state
- Manages the state of
qemu-guest-agent.service(enable/disable at boot, plus start/stop/restart/reload). - Triggers: none.
Optional Role Variables¶
qemu_guest_agent__service_enabled
- Whether
qemu-guest-agent.serviceis enabled at boot, analogous tosystemctl enable / disable. - Type: Bool.
- Default:
true
qemu_guest_agent__service_state
- State of
qemu-guest-agent.service, analogous tosystemctl start / stop / restart / reload. - Type: String. One of
reloaded,restarted,started,stopped. - Default:
'started'ifqemu_guest_agent__service_enabledistrue, otherwise'stopped'.
Example:
# optional
qemu_guest_agent__service_enabled: true
qemu_guest_agent__service_state: 'started'