If you run pfSense as a virtual machine on Proxmox VE, installing and enabling the QEMU guest agent lets Proxmox properly communicate with the VM. It can gracefully shut down pfSense instead of hard-killing it, and it can read the VM’s IP addresses directly from the Proxmox UI.

Step 1: Enable the agent in Proxmox

First, tell Proxmox to expect a guest agent on the VM. In the Proxmox web UI:

  1. Select the pfSense VM and go to Hardware > Options.
  2. Double-click QEMU Guest Agent and check Enabled.
  3. Click OK.

You can also set this via the CLI on the Proxmox host:

qm set <VMID> --agent enabled=1

Replace <VMID> with your VM’s ID (e.g. 100).

Step 2: Install the plugin in pfSense

The guest agent is available as an FreeBSD package. It’s not available in the pfSense Package Manager

  1. Open the console of the pfSense machine or access it by using SSH.
  2. Use command pkg install -y qemu-guest-agent to install the agent binaries.

Step 3: The workaround for pfSense

Because pfSense is different from FreeBSD in regards to initializing the system, we need to make a symlink. This is because pfSense only reads files with .sh extension during init.

Run the following command to make a link to the file but named it with .sh extension :

ln -s /usr/local/etc/rc.d/qemu-guest-agent /usr/local/etc/rc.d/qemu-guest-agent.sh

Step 4: Reboot or Start the service

After installation and placing our workaround .sh-file, reboot!

If you’re in an environment where rebooting isn’t an option, you can start the agent service:

service qemu-guest-agent start

Verify in Proxmox

Back in the Proxmox web UI, select the VM and open the Summary tab. The IP addresses of the pfSense interfaces should now appear under the VM summary. The Shutdown button in Proxmox will also now send a graceful ACPI shutdown signal instead of simulating a power cut.