The QEMU Guest Agent (QGA) is a small daemon running inside a virtual machine that communicates with the Proxmox VE host via a VirtIO serial channel. Without the Guest Agent, Proxmox lacks critical information about the VM’s state — and features like consistent snapshots do not work correctly.
What the Guest Agent Does
The QEMU Guest Agent provides four core functions:
1. Freeze/Thaw for Consistent Snapshots
The most important function: before Proxmox creates a snapshot, it sends a freeze command to the guest operating system via the Guest Agent. This freezes all filesystem I/O operations so that the snapshot captures a consistent state. After the snapshot, the filesystem is released with thaw.
Proxmox VE Guest Agent (in VM)
| |
|--- guest-fsfreeze-freeze --> |
| | (filesystem frozen)
|--- create snapshot --------> |
|--- guest-fsfreeze-thaw ----> |
| | (I/O resumed)
Without the Guest Agent, Proxmox creates so-called crash-consistent snapshots — comparable to the state after a power outage. Databases and applications with open write operations may be inconsistent after restoration.
2. IP Address Display
In the Proxmox dashboard, the IPs column shows the VM’s network addresses — but only when the Guest Agent is installed. Without it, the field remains empty. Especially in environments with DHCP and many VMs, the IP display is indispensable.
3. Clean Shutdown
The Guest Agent enables a graceful shutdown of the VM through the Proxmox GUI. Without it, Proxmox can only send an ACPI shutdown signal, which is not reliably processed by all operating systems. With the Guest Agent, a real shutdown command is executed inside the guest.
4. Time Synchronization After Suspend/Resume
After a suspend/resume cycle or live migration, the Guest Agent synchronizes the VM’s system time with the host time. This prevents time drift, which can cause issues with Kerberos authentication, TLS certificates, and logging.
Installation on Linux
Debian/Ubuntu
# Install the Guest Agent
apt update
apt install -y qemu-guest-agent
# Start and enable the service
systemctl enable --now qemu-guest-agent
# Check status
systemctl status qemu-guest-agent
RHEL/AlmaLinux/Rocky Linux
# Install the Guest Agent
dnf install -y qemu-guest-agent
# Start and enable the service
systemctl enable --now qemu-guest-agent
# Check status
systemctl status qemu-guest-agent
Alpine Linux (LXC hosts or lightweight VMs)
# Install the Guest Agent
apk add qemu-guest-agent
# Configure the channel in /etc/conf.d/qemu-guest-agent
echo 'GA_PATH="/dev/virtio-ports/org.qemu.guest_agent.0"' > /etc/conf.d/qemu-guest-agent
# Start and enable the service
rc-update add qemu-guest-agent default
service qemu-guest-agent start
Arch Linux
pacman -S qemu-guest-agent
systemctl enable --now qemu-guest-agent
Installation on Windows
Prerequisites
The QEMU Guest Agent for Windows is part of the VirtIO driver package. If VirtIO drivers are already installed, only the Guest Agent may be missing.
Installation via VirtIO Installer
- Download the VirtIO ISO: Latest version from
fedorapeople.org/groups/virt/virtio-win/direct-downloads/ - Attach the ISO to the VM: Hardware > CD/DVD > select ISO image
- Run the installer: Launch
virtio-win-guest-tools.exefrom the ISO - The installer installs all VirtIO drivers and the Guest Agent
Manual Installation
If only the Guest Agent is needed:
# In the mounted VirtIO ISO
cd D:\guest-agent\
# Install 64-bit version
msiexec /i qemu-ga-x86_64.msi /quiet /norestart
# Check the service
Get-Service QEMU-GA
Verify Service Status
# Status of the QEMU Guest Agent
Get-Service QEMU-GA | Format-List Name, Status, StartType
# Expected output:
# Name : QEMU-GA
# Status : Running
# StartType : Automatic
Proxmox-Side Configuration
Enable the Guest Agent in VM Settings
The Guest Agent must be explicitly enabled in the VM options within Proxmox VE:
Web GUI: VM > Options > QEMU Guest Agent > Edit > check the box
CLI:
# Enable Guest Agent
qm set <VMID> --agent enabled=1
# With freeze/thaw for snapshots (recommended)
qm set <VMID> --agent enabled=1,fstrim_cloned_disks=1
# Verify configuration
qm config <VMID> | grep agent
The fstrim_cloned_disks=1 option automatically runs TRIM on the disks of a newly cloned VM — important for thin provisioning.
VirtIO Serial Port
Proxmox automatically creates a VirtIO serial port (/dev/virtio-ports/org.qemu.guest_agent.0) when the Guest Agent is enabled. This channel serves as the communication path between host and guest.
# On the Proxmox host: test communication
qm agent <VMID> ping
# Retrieve network information
qm agent <VMID> network-get-interfaces
# Filesystem information
qm agent <VMID> get-fsinfo
Guest Agent Commands in Detail
The Guest Agent supports numerous commands that can be called via qm agent or directly through QMP:
# Freeze filesystems (before snapshot)
qm agent <VMID> fsfreeze-freeze
# Check status
qm agent <VMID> fsfreeze-status
# Thaw filesystems
qm agent <VMID> fsfreeze-thaw
# Retrieve hostname
qm agent <VMID> get-host-name
# OS information
qm agent <VMID> get-osinfo
# Time information
qm agent <VMID> get-time
# Network interfaces
qm agent <VMID> network-get-interfaces
# Run TRIM (SSD optimization)
qm agent <VMID> fstrim
Troubleshooting
Problem: Guest Agent Not Responding
Symptom: qm agent <VMID> ping returns a timeout error.
Checklist:
# 1. Is the Guest Agent enabled in Proxmox?
qm config <VMID> | grep agent
# Expected: agent: enabled=1
# 2. Is the service running inside the VM?
# Linux:
systemctl status qemu-guest-agent
# Windows:
# Get-Service QEMU-GA
# 3. Does the VirtIO serial port exist in the VM?
ls -la /dev/virtio-ports/
# Expected: org.qemu.guest_agent.0
# 4. Firewall blocking the channel?
# The Guest Agent does not use a network port but a
# VirtIO serial channel. Firewalls are not the issue here.
# 5. Reboot the VM (after enabling Guest Agent in Proxmox)
qm reboot <VMID>
Problem: IP Addresses Not Displayed
Cause: The Guest Agent is running, but Proxmox shows no IPs.
# Query network interfaces directly
qm agent <VMID> network-get-interfaces
# If the command works but the GUI shows no IPs:
# Hard refresh the Proxmox VE GUI (Ctrl+Shift+R in the browser)
# Or wait briefly — the GUI updates data periodically
Problem: Freeze/Thaw Fails
# Test manual freeze
qm agent <VMID> fsfreeze-freeze
# Common cause: NFS or CIFS mounts
# Network filesystems can block the freeze
# Solution: Add "nofail" to mounts in /etc/fstab and exclude if needed
# Check status (should return "frozen")
qm agent <VMID> fsfreeze-status
# Important: do not forget to thaw!
qm agent <VMID> fsfreeze-thaw
Problem: Guest Agent on Windows Does Not Start
# Check service details
Get-WmiObject Win32_Service | Where-Object {$_.Name -eq "QEMU-GA"} |
Select-Object Name, State, StartMode, PathName
# Common cause: VirtIO serial driver is missing
# Check Device Manager: "PCI Simple Communications Controller"
# must be recognized as VirtIO Serial Driver
# Install the driver manually
pnputil /add-driver "D:\vioserial\2k22\amd64\vioser.inf" /install
# Restart the service
Restart-Service QEMU-GA
Best Practices
Automatic Installation via Cloud-Init
For new Linux VMs, the Guest Agent can be installed automatically via Cloud-Init:
# Cloud-Init user data
#cloud-config
packages:
- qemu-guest-agent
runcmd:
- systemctl enable --now qemu-guest-agent
Monitoring Guest Agent Connectivity
# Script: Check Guest Agent status for all VMs
for vmid in $(qm list | awk 'NR>1 {print $1}'); do
name=$(qm config $vmid | grep '^name:' | awk '{print $2}')
if qm agent $vmid ping 2>/dev/null; then
echo "VM $vmid ($name): Guest Agent OK"
else
echo "VM $vmid ($name): Guest Agent NOT reachable"
fi
done
Ensuring Backup Consistency
For production environments with databases, a pre-freeze script inside the VM is recommended in addition to freeze/thaw:
# /etc/qemu/fsfreeze-hook.d/10-mysql-flush.sh
#!/bin/bash
case "$1" in
freeze)
mysql -e "FLUSH TABLES WITH READ LOCK; SYSTEM sync;"
;;
thaw)
mysql -e "UNLOCK TABLES;"
;;
esac
The hook script is called automatically by the Guest Agent before freeze and after thaw, ensuring database-consistent snapshots.
Conclusion
The QEMU Guest Agent is a small tool with a big impact. Consistent snapshots, IP display, and clean shutdowns are essential in production environments. Installation takes just a few minutes, and with freeze hook scripts, backup consistency can be ensured even for demanding database workloads. In every Proxmox environment, the Guest Agent should be part of the standard configuration for every VM.
More on these topics:
More articles
Backup Strategy for SMBs: Proxmox PBS + TrueNAS as a Reliable Backup Solution
Backup strategy for SMBs with Proxmox PBS and TrueNAS: implement the 3-2-1 rule, PBS as primary backup target, TrueNAS replication as offsite copy, retention policies, and automated restore tests.
Proxmox Notification System: Matchers, Targets, SMTP, Gotify, and Webhooks
Configure the Proxmox notification system from PVE 8.1: matchers and targets, SMTP setup, Gotify integration, webhook targets, notification filters, and sendmail vs. new API.
Proxmox Cluster Network Design: Corosync, Migration, Storage, and Management
Design Proxmox cluster networks: Corosync ring, migration network, storage network for Ceph/iSCSI, management VLAN, bonding/LACP, and MTU 9000 — with example topologies.