2.7,1 update seems to break qemu-guest-agent auto-start
-
@crichmon said in 2.7,1 update seems to break qemu-guest-agent auto-start:
I'm setting a new proxmox server to replace my existing box
To get the agent to start automatically I have had to do all of the steps listed in
https://forum.netgate.com/post/1116089 and https://forum.netgate.com/post/1098565Btw it works OK for me using Proxmox v8.0.9 (and many earlier versions with pfsense 2.6, 2.7, 2.7.1
-
-
@Viper_Rus
So... I did find on the new box that /usr/local/etc/rc.d/qemu-agent.sh was missing. Once copied from older box,
and actually shutting down the VM, solved the problem on the newer box. So, to follow one of the suggestions,
I renamed /etc/rc.conf to rc.conf.local and got a boot error from devd about a missing rc.conf, but low and behold,
the agent was still started. To solve that, I created another rc.conf that contains just the #!/bin/sh line, and set
permissions, and everything still works as expected.About the older machine, I'll have to work on that later, since that's our firewall and I'll need a quiet time to fiddle
with. It's more odd in that it was working on pfSense 2.7.0, and broke with update to 2.7.1. I'll update once I
find out more.
thx, Chris -
@crichmon
So, on the older box, I made two changes at the same time, so don't know which fixed it, but moved the agent config to
rc.conf.local and added the #!/bin/sh to the otherwise empty rc.conf, powered the VM down, and with startup, no complaints
from devd and the agent auto-started. Cased closed, at least for me.
Thx, Chris -
@crichmon said in 2.7,1 update seems to break qemu-guest-agent auto-start:
but moved the agent config to
rc.conf.localNote that on pfSense, at least on previous versions, it was required to put local customizations (such as starting some service or agent at boot) in
rc.conf.local
, becauserc.conf
is overwritten by pfSense during every update. Any local entries a user had placed inrc.conf
would be lost. But therc.conf.local
file is specifically designed for user customizations and is not touched on upgrades. -
@bmeeks Hi, yeah, I'm aware (more or less) and is why I moved the config to the .local file.
Both boxes are back in working order.The semi-confusing part is that there are a multitude of instructions to be found, and I think the actual install
of the qemu-guest-agent package is what says to edit /etc/rc.conf.
Anyhow, I appreciate all the help. Hopefully this thread trends better than the older ones.
Chris -
@crichmon said in 2.7,1 update seems to break qemu-guest-agent auto-start:
The semi-confusing part is that there are a multitude of instructions to be found, and I think the actual install
of the qemu-guest-agent package is what says to edit /etc/rc.conf.That is true for an install on a general FreeBSD or Linux distro. The instructions you see that scroll down as you install the package are simply the default instructions that come with the package from FreeBSD ports. Unfortunately, it is not customized for pfSense.
pfSense is unique. It stores all configuration information that is associated with the most typically edited/customized conf text files in the
config.xml
file managed by the pfSense code. The configuration parameters in that file are read out during various pfSense operations and physicallly written to the appropriate conf files in/etc/
or/usr/local/etc/
each time a user clicks Save in the GUI. And during those write operations the entire file is recreated with the new content. Hence anything a user had put in there via a shell prompt or other direct editing access is overwritten.The above is also true for the many packages used on pfSense. The Snort and Suricata packages I maintain work that way. On any other Unix-type system the admin would directly edit the
suricata.yaml
file to configure Suricata or thesnort.conf
file to configure Snort. But on pfSense, all of the configuration information lives inconfig.xml
and those filesystem conf files are recreated by the PHP GUI code with each Save operation. -
@bmeeks Thanks a bunch for the clarifications and details. I'm newish to pfSense and FreeBSD, but not new to UNIX/Linux in general.
This sort of thing (/etc files updating) isn't "usual" for me, but not surprising given how pfSense is set up. I tend to shun GUI's, but
pfSense and proxmox seem really solid, and I like that you can still get to the actual configs in both.Thx, Chris
-
@crichmon said in 2.7,1 update seems to break qemu-guest-agent auto-start:
@bmeeks Thanks a bunch for the clarifications and details. I'm newish to pfSense and FreeBSD, but not new to UNIX/Linux in general.
This sort of thing (/etc files updating) isn't "usual" for me, but not surprising given how pfSense is set up. I tend to shun GUI's, but
pfSense and proxmox seem really solid, and I like that you can still get to the actual configs in both.Thx, Chris
The way pfSense works with regards to recreating/overwriting configuration files on the disk is what allows the single-file
config.xml
backup process to work. Every configuration parameter needed for pfSense lives in that singleconfig.xml
file, so simply backing up and then restoring that single file (along with a reboot after the restore) is all you need to resurrect your firewall to a previous state. You don't have to backup the entire disk file-by-file. The GUI code will read all the configuration parameters out of theconfig.xml
file and recreate/overwrite the necessary conf files on the disk. -
@bmeeks
Sure, and I 'get it' and not complaining. It helps to have a clear understanding of how things work.
Not trying to rock the boat. As mentioned, I'm doing my best to get with newer (to me) things.Thx, Chris