What is the Qemu Guest Agent?

Put simple it allows the hypervisor to know and more completely control the installed guest(VM). It does this by integrating into the VM OS and provides hoots to do the following:

  • Track of IPs used by the installed VM's.
  • Better base system controls such as reboot.

So here is a quick tutorial on installing into a pfSense that is running as a VM on for instance Proxmox

Step 1 - Install guest agent package.

For current pfSense, simply install pkg qemu-guest-agent

pkg install qemu-guest-agent


Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        qemu-guest-agent: 5.0.1 [pfSense]

Number of packages to be installed: 1

111 KiB to be downloaded.

Proceed with this action? [y/N]: Y
[1/1] Fetching qemu-guest-agent-5.0.1.pkg: 100%  111 KiB 113.2kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing qemu-guest-agent-5.0.1...
[1/1] Extracting qemu-guest-agent-5.0.1: 100%
Message from qemu-guest-agent-5.0.1:

Modify your `/etc/rc.conf` by adding these settings

qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"

and run
# service qemu-guest-agent start

For detailed help use `qemu-ga -h`

Step 2 - Modify rc.conf so it is enabled

I used nano as it is simple but vi works too and is installed already in pfSense. Here is how to install nano.

Optional - Install Nano editor

pkg install nano

Now edit /etc/rc.conf. Note: Ignore the line at the top about the file this I think is to force you to use the directory option. However for this article, just modify the file. Add the below lines.

qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"

Now save the file and perform the next step.

Step 3 - Start the Service

Simple enough, just run service start command

service qemu-guest-agent start

Step 4 - Confirm it is providing data back to Hypervisor such as Proxmox

Now look at hypervisor and see if the IP's are visible.

Example of Qemu Agent Working


Below is some common troubles.

Worked until reboot of pfSense

This happens because Step 2 failed to happen correctly. Redo step 2.

Other things in Proxmox

One other thing has to be on in order for Qemu agent to work in Proxmox. Set the Qemu flag.

Leave a Reply

Your email address will not be published. Required fields are marked *