pfSense: QEMU Guest Agent Installation and Configuration

Introduction

This tutorial is on how to install and configure a QEMU Guest Agent on pfSense when running pfsense as a qemu/kvm guest on Proxmox. QEMU Guest Agent doesn’t show up on the pfSense WebGUI package manager for some reason and therefore has to be installed via the command line shell.

Assumptions

  1. The pfSense guest virtual machine (VM) has already been installed on the Proxmox host with a basic working configuration.
  2. The qemu guest option is enabled on the VM. If not, then enable it under the VM options.

Instructions

Search for the qemu guest agent package in the pfsense vm.

# pkg search \g | grep qemu

Install the qemu guest agent package.

# pkg install qemu-guest-agent 

By default, the rc.conf.local file doesn’t exist in the /etc directory, we will have to create it.

# touch /etc/rc.conf.local
# ee /etc/rc.conf.local

Paste the following in the /etc/rc.conf.local file.

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

Create a qemu guest agent startup script. We will need this to start the guest agent on boot.

# touch /usr/local/etc/rc.d/qemu-agent.sh
# ee /usr/local/etc/rc.d/qemu-agent.sh

Paste the following lines in the /usr/local/etc/rc.d/qemu-agent.sh file.

#!/bin/sh
sleep 3
service qemu-guest-agent start

Enable the executable permissions on the qemu guest agent startup script.

# chmod +x /usr/local/etc/rc.d/qemu-agent.sh

Start the qemu-guest-agent service.

# service qemu-guest-agent start

Go into the Proxmox host WebGUI and confirm the qemu guest agent syncs with the host machine when the IP addresses and disk info shows up on the VM dashboard.

Leave a comment

Your email address will not be published.