Skip to content

Email: admin@alshowto.com

Al's Down`N Dirty KB

Al's Down`N Dirty KB

Get`Er Done

  • Home
  • vm
  • pfSense and Qemu Guest Agent

pfSense and Qemu Guest Agent

Posted on October 26, 2022October 27, 2022 By admin No Comments on pfSense and Qemu Guest Agent
Linux, ProxMox, vm

Intro

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

Output

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_enable="YES"
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_enable="YES"
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

Troubleshooting

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.

Related

Tags: pfSense ProxMox

Post navigation

❮ Previous Post: Roundcube Latest Install Script
Next Post: Question about Vaccines ❯

You may also like

Kubernetes
Install K8 and Rancher2.6 on Debian11
October 6, 2022
Linux
Reset Debian machine_id
September 17, 2022
ProxMox
Cloud Debian 11 Image
September 16, 2022
Let's Encrypt
Proxmox Manual Update Certs
October 20, 2022

Leave a Reply Cancel reply

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

Copyright © 2023 Al's Down`N Dirty KB.

Theme: Oceanly Premium by ScriptsTown