Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfSense VM on ProxMox : Qemu-agent installation

    Scheduled Pinned Locked Moved Virtualization
    42 Posts 24 Posters 72.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Carsonix
      last edited by

      Proxmox 7.3-3 and pfSense 2.6.0

      /etc/rc.conf.local doesn't exit. I created it and added

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

      but qemu-guest-agent doesn't startup on boot.

      Is there another way of doing this.

      P 1 Reply Last reply Reply Quote 0
      • P
        Patch @Carsonix
        last edited by

        @carsonix said in PfSense VM on ProxMox : Qemu-agent installation:

        Is there another way of doing this.

        2. Manual installation
            (a) Create the following 2 files
                i. Navigate to pfsense → Diagnostic → Edit file. 
                    A. Enter text file path & browse → confirm doesn’t exist. 
                    B. Enter text file content & full name including path then click Save to create file. 
                    C. Leave only path & click Browse to confirm file created as expected. 
                ii. File name: /etc/rc.conf.local 
                   qemu_guest_agent_enable="YES"
                   qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
                   #virtio_console_load="YES"
                iii. File name: /usr/local/etc/rc.d/qemu-agent.sh
                   #!/bin/sh
                   sleep 3
                   service qemu-guest-agent start
            (b) Login to console as root (VM console in Proxmox)
                i. pkg install -y qemu-guest-agent
                ii. cd /usr/local/etc/rc.d/
                iii. chmod +x qemu-agent.sh
            (c) Change Proxmox settins
                i. Shutdown pfsense
                ii. Proxmox VM → Options → QEMU Guest Agent → Enable
                iii. Restart VM
        
        S 1 Reply Last reply Reply Quote 1
        • NollipfSenseN NollipfSense referenced this topic on
        • S
          shadeless @Patch
          last edited by shadeless

          @Patch said in PfSense VM on ProxMox : Qemu-agent installation:

          @carsonix said in PfSense VM on ProxMox : Qemu-agent installation:

          Is there another way of doing this.

          2. Manual installation
              (a) Create the following 2 files
                  i. Navigate to pfsense → Diagnostic → Edit file. 
                      A. Enter text file path & browse → confirm doesn’t exist. 
                      B. Enter text file content & full name including path then click Save to create file. 
                      C. Leave only path & click Browse to confirm file created as expected. 
                  ii. File name: /etc/rc.conf.local 
                     qemu_guest_agent_enable="YES"
                     qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
                     #virtio_console_load="YES"
                  iii. File name: /usr/local/etc/rc.d/qemu-agent.sh
                     #!/bin/sh
                     sleep 3
                     service qemu-guest-agent start
              (b) Login to console as root (VM console in Proxmox)
                  i. pkg install -y qemu-guest-agent
                  ii. cd /usr/local/etc/rc.d/
                  iii. chmod +x qemu-agent.sh
              (c) Change Proxmox settins
                  i. Shutdown pfsense
                  ii. Proxmox VM → Options → QEMU Guest Agent → Enable
                  iii. Restart VM
          

          does this work on 2.7.0?
          Just tried it and when trying to start the service, i get the message that i have to set qemu_guest_agent_enable to YES in rc.conf.
          Seems like rc.conf.local isnt read properly?

          weehooeyW P 2 Replies Last reply Reply Quote 0
          • weehooeyW
            weehooey @shadeless
            last edited by

            @shadeless We have confirmed that this script works on 2.7.0 and have updated the notes to reflect this.

            https://github.com/Weehooey/pfSense-scripts

            S Bob.DigB T 3 Replies Last reply Reply Quote 1
            • S
              shadeless @weehooey
              last edited by

              @weehooey thanks for checking - found the error on my side, there was a whitespace at the end of the rc.conf.local filename.... 🤦

              1 Reply Last reply Reply Quote 0
              • Bob.DigB
                Bob.Dig LAYER 8 @weehooey
                last edited by

                @weehooey I have a VPS with runs on KVM. Will I profit from using this even if it is not Proxmox? Any hint what it actually is, it doesn't say, other than being KVM.

                weehooeyW 1 Reply Last reply Reply Quote 0
                • weehooeyW
                  weehooey @Bob.Dig
                  last edited by

                  Hey @Bob-Dig I think it should. Of course, you will want to test to confirm.

                  Proxmox is KVM/QEMU under the hood. We have used this successfully with OpenStack (in OVHcloud), which is also KVM.

                  Although, if you have a VPS that is hosted by a third party, there may be things which prevent it from working correctly.

                  The QEMU guest agent gives insight into the VM and provides some communication. In Proxmox, with the guest agent, you get an accurate reading of the RAM the VM is actually using and the VM responds to the power off/reboot commands.

                  I would not want to run a VM without a guest agent for the platform it is running on.

                  Bob.DigB 1 Reply Last reply Reply Quote 1
                  • Bob.DigB
                    Bob.Dig LAYER 8 @weehooey
                    last edited by

                    @weehooey If I connect via VNC to it, it says QEMU, so I think I am good. But can't see any differences in their web-GUI nor in pfSense after installing.

                    1 Reply Last reply Reply Quote 0
                    • P
                      Patch @shadeless
                      last edited by Patch

                      @shadeless said in PfSense VM on ProxMox : Qemu-agent installation:

                      does this work on 2.7.0?

                      It works the same on pfsense v2.6 and v2.7
                      You have to do all of

                      1. Create file /etc/rc.conf.local with above contents
                      2. Create file /usr/local/etc/rc.d/qemu-agent.sh with above contents and change it's properties to enable execute permission
                      3. Install the package qemu-guest-agent in the VM
                      4. Enable Qemu agent in Proxmox, stop the VM then restart it.
                      weehooeyW 1 Reply Last reply Reply Quote 0
                      • weehooeyW
                        weehooey @Patch
                        last edited by

                        @Patch you do not need to stop and restart the VM.

                        Check out the script for the commands: https://github.com/Weehooey/pfSense-scripts

                        C 1 Reply Last reply Reply Quote 2
                        • C
                          chigz @weehooey
                          last edited by

                          @weehooey

                          Neat, this works for 23.05.1 too.
                          Thanks

                          1 Reply Last reply Reply Quote 1
                          • Bob.DigB
                            Bob.Dig LAYER 8
                            last edited by

                            I am now a proxmox user too and your script is awesome, thanks.

                            P 1 Reply Last reply Reply Quote 1
                            • P
                              Patch @Bob.Dig
                              last edited by

                              Or do it manually.
                              Takes about 2 minutes using (paste from a cheat sheet works)

                              • Diagnostics -> Edit file
                              • Diagnostics -> Command prompt -> Execute Shell Command
                              NollipfSenseN 1 Reply Last reply Reply Quote 3
                              • NollipfSenseN
                                NollipfSense @Patch
                                last edited by

                                @Patch said in PfSense VM on ProxMox : Qemu-agent installation:

                                Or do it manually

                                Never failed and my preferred method, thanks Patch...

                                pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
                                pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

                                1 Reply Last reply Reply Quote 0
                                • T
                                  thewho @weehooey
                                  last edited by

                                  @weehooey

                                  i was not able to use your script because the agent gives me a error.

                                  service qemu-guest-agent start
                                  Cannot 'start' qemu_guest_agent. Set qemu_guest_agent_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.
                                  
                                  

                                  but as soon as i added it in the /etc/rc.conf i was able to start the agent. Has something changed with 2.7.1? (first time using proxmox and QEMU)

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    mervincm @thewho
                                    last edited by

                                    @thewho I installed on 2.7 and upgraded to 2.7.1 and mine appears to remain functional. service qemu-guest-agent start tells me qemu_guest_agent already running? and provides the pid for it. That said .. something is wrong as my memory consumed in the proxmox host has doubled after the move 2.7>2.7.1 (3.2G>7.1G)

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.