sudo apt install qemu-guest-agent
sudo yum install qemu-guest-agent
Download the virtio-win driver iso (see Windows VirtIO Drivers).
After that, you have to install the qemu-guest-agent:
After that the qemu-guest-agent should be up and running.
PS C:\Users\Administrator> Get-Service QEMU-GA
returns:
Status Name DisplayName ------ ---- ----------- Running QEMU-GA QEMU Guest Agent
NOTE: If it is not running, use the Services control panel to start it and make sure that it will start automatically on the next boot.
Depending on the distribution, the guest agent might not start automatically after the installation.
Start it either directly with
sudo systemctl start qemu-guest-agent
Then enable the service to autostart (permanently) if not auto started, with
sudo systemctl enable qemu-guest-agent
qm set VMID --agent 1
The communication with the guest agent takes place over a unix socket located in /var/run/qemu-server/<my_vmid>.qga.
Test the communication qm agent:
qm agent <vmid> ping
NOTE: If the qemu-guest-agent is correctly runnning in the VM, it will return without an error message.