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

    PfSense VM on ProxMox : Qemu-agent installation

    Scheduled Pinned Locked Moved Virtualization
    51 Posts 27 Posters 81.4k Views 27 Watching
    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.
    • weehooeyW Offline
      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 Offline
        chigz @weehooey
        last edited by

        @weehooey

        Neat, this works for 23.05.1 too.
        Thanks

        1 Reply Last reply Reply Quote 1
        • Bob.DigB Offline
          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 Offline
            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 Offline
              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 Offline
                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 Offline
                  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
                  • lifeofguenterL Offline
                    lifeofguenter
                    last edited by

                    Does this still work under 2.8.1?

                    qemu-guest-agent is installed and runs when I start it as a service.

                    I also added the following to /etc/rc.conf.local:

                    qemu_guest_agent_enable="YES"
                    

                    but it won't start after reboot?

                    patient0P weehooeyW S 3 Replies Last reply Reply Quote 0
                    • patient0P Online
                      patient0 @lifeofguenter
                      last edited by

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

                      but it won't start after reboot?

                      pfSense does not use the standard FreeBSD RC system.

                      I did install the 'Shellcmd' package and created an entry of type 'shellcmd' with command service qemu-guest-agent start that is executed at the start. Although that is on pfSense+ I'm sure it will work as well on pfSense CE.

                      1 Reply Last reply Reply Quote 0
                      • weehooeyW Offline
                        weehooey @lifeofguenter
                        last edited by

                        @lifeofguenter yes, tested and working on 2.8.1

                        Did you use the code from our repo?

                        github.com - Weehooey - pfSense Scripts

                        It has code that works functionally the same as what @patient0 mentions.

                        lifeofguenterL 1 Reply Last reply Reply Quote 1
                        • lifeofguenterL Offline
                          lifeofguenter @weehooey
                          last edited by

                          @weehooey your script does not work.

                          When I install qemu-guest-agent it already installs a start script:

                          Shell Output - cat /usr/local/etc/rc.d/qemu-guest-agent
                          
                          #!/bin/sh
                          #
                          # PROVIDE: qemu_guest_agent
                          # REQUIRE: DAEMON
                          # KEYWORD: nojail
                          #
                          
                          #
                          # Add the following lines to /etc/rc.conf to enable qemu-guest-agent:
                          #
                          #qemu_guest_agent_enable="YES"
                          #
                          # For detailed logging add flags -v and -l to /etc/rc.conf
                          #
                          #qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
                          
                          . /etc/rc.subr
                          
                          name=qemu_guest_agent
                          rcvar=qemu_guest_agent_enable
                          
                          load_rc_config $name
                          
                          qemu_guest_agent_flags=${qemu_guest_agent_flags-"-d"}
                          qemu_guest_agent_enable=${qemu_guest_agent_enable:-"NO"}
                          
                          qemu_guest_agent_bin=/usr/local/bin/qemu-ga
                          command=${qemu_guest_agent_bin}
                          pidfile="/var/run/qemu-ga.pid"
                          
                          run_rc_command "$1"
                          
                          

                          but it never executes.

                          weehooeyW 1 Reply Last reply Reply Quote 0
                          • weehooeyW Offline
                            weehooey @lifeofguenter
                            last edited by

                            @lifeofguenter are those # part of the contents of the file? If so, everything in the file is commented out except the shebang line.

                            lifeofguenterL weehooeyW 2 Replies Last reply Reply Quote 0
                            • lifeofguenterL Offline
                              lifeofguenter @weehooey
                              last edited by

                              @weehooey it’s cropped , you need to scroll inside the text field

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                SteveITS Rebel Alliance @lifeofguenter
                                last edited by

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

                                but it won't start after reboot?

                                Hmm, we have a CE 2.7.2 VM that was rebooted recently and it's running. Are we saying it doesn't in 2.8.x?

                                /etc/rc.conf.local:
                                qemu_guest_agent_enable="YES"
                                #qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
                                qemu_guest_agent_flags="-d -l /var/log/qemu-ga.log"

                                and:
                                service qemu-guest-agent status:
                                qemu_guest_agent is running as pid 87501.

                                Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                                When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
                                Upvote 👍 helpful posts!

                                lifeofguenterL 1 Reply Last reply Reply Quote 0
                                • lifeofguenterL Offline
                                  lifeofguenter @SteveITS
                                  last edited by

                                  @SteveITS at least that is my observation.

                                  Manually starting the service works, but it’s not being picked up my rc.conf.local or any similar option.

                                  1 Reply Last reply Reply Quote 0
                                  • weehooeyW Offline
                                    weehooey @weehooey
                                    last edited by

                                    @lifeofguenter Ah. I see that now. I did not realized the windows scrolled.

                                    @weehooey your script does not work.
                                    When I install qemu-guest-agent it already installs a start script:

                                    What you are showing is not what our script does.

                                    I can tell you that we tested using the script we provided, and it works on 2.8.1.

                                    Perhaps you have not marked your script as executable?

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