Installing and Configuring QEMU Guest Agent in Proxmox VMs
Installing and Configuring QEMU Guest Agent in Proxmox VMs
The QEMU Guest Agent allows improved communication between your Proxmox host and guest VMs, enabling features like proper VM shutdown, file transfers, disk freeze for snapshots, and more accurate memory statistics.
Prerequisites
- A running Proxmox VE installation
- A virtual machine running a supported OS
Enable QEMU Guest Agent in Proxmox
Before installing the agent in your VM, you need to ensure it’s enabled in the VM configuration:
- Shut down your VM
- Go to Proxmox web UI
- Select your VM
- Go to “Hardware” tab
- Click “Add” and select “QEMU Guest Agent”
- Or, enable it via Shell:
1
qm set YOUR_VM_ID --agent enabled=1
- Start your VM again
Install QEMU Guest Agent Inside the VM
For Debian/Ubuntu-based VMs:
1
2
3
4
sudo apt update
sudo apt install qemu-guest-agent
sudo systemctl enable qemu-guest-agent
sudo systemctl start qemu-guest-agent
For CentOS/RHEL/Fedora:
1
2
3
4
5
sudo dnf install qemu-guest-agent
# OR for older versions:
# sudo yum install qemu-guest-agent
sudo systemctl enable qemu-guest-agent
sudo systemctl start qemu-guest-agent
For Arch Linux:
1
2
3
sudo pacman -S qemu-guest-agent
sudo systemctl enable qemu-guest-agent.service
sudo systemctl start qemu-guest-agent.service
For Windows VMs:
- Download the QEMU Guest Agent installer for Windows from Fedora’s repositories or other trusted sources
- Install the package
- The service will start automatically
Verifying Installation
After installation, you can verify the guest agent is working properly:
- From the Proxmox web interface, select your VM
- Look for “Agent” in the summary tab - it should show “connected”
- Or check via Shell:
1
qm agent YOUR_VM_ID ping
If it returns without errors, the agent is working. You can also test more commands:
1
qm agent YOUR_VM_ID info
Benefits of Using QEMU Guest Agent
- Proper shutdown/reboot: Instead of simulating power button presses, Proxmox can request graceful shutdowns
- Freezing filesystems: Enables consistent snapshots by freezing filesystems during snapshot creation
- Memory statistics: Get accurate memory usage instead of estimates
- Network information: Retrieve guest IP addresses directly
- File operations: Execute file operations within the guest from the host
- VM backup: Improved backup consistency
Troubleshooting
If the agent isn’t working:
- Verify the agent is installed and running inside the VM:
1
sudo systemctl status qemu-guest-agent - Check that the agent is enabled in VM configuration:
1
qm config YOUR_VM_ID | grep agent - Check if the guest agent socket exists:
1
ls -la /dev/virtio-ports/
- For Windows, check Services app to ensure “QEMU Guest Agent” service is running
The QEMU Guest Agent significantly improves the management capabilities of your Proxmox VMs and should be considered a standard component of your virtualization setup.
This post is licensed under CC BY 4.0 by the author.