Hey that's my reddit post !
Sorry to bring this back from the dead, but I did in fact solve my issue. It was not done in the most elegant way, but it does what I need so, I guess that's good !
My home's setup is a 120v powered Proxmox server (on the UPS) and a 12v powered Proxmox server (on a car battery / home made UPS).
My problem was getting to run NUT server on the 12v Proxmox server OPNsense VM so that it monitors the UPS that is powering the 120v Proxmox server which hosts my primary OPNsense. The 12v OPNsense would always shut down when the 120v UPS would kick in even though it is on a different power source.
The 120v Proxmox server is the main server, which hosts many different VMs and LXC such as my primary OPNsense, FreePBX, Pihole, etc, and the 12v server is the "power outage backup router" that runs the backup OPNsense as well as the Omada controller to keep the APs running, Pihole and others light things, including NUT server.
My not-so-elegant solution :
- I have instealled the NUT server on a Debian VM on the 12v Proxmox server, with a USB passthrough of the port that goes to the UPS
- I have installed the client NUT package ONLY on the primary OPNsense so that it can shut down when there is a power outage, but not on the backup OPNsense.
- I have also created a very basic script that I have added to the crontab. It runs every minute to validate if the UPS is back on power because the "FSD OL" status would always kill my primary OPNsense when it was booting and can only be reset back to "OL" by restarting the daemon.
Here is the cron job script if you are interested. Simply adjust the UPS' name
I understand that this is not a real real solution to running the NUT server on OPNsense, but that is how I ended up doing it.
Sorry to bring this back from the dead, but I did in fact solve my issue. It was not done in the most elegant way, but it does what I need so, I guess that's good !
My home's setup is a 120v powered Proxmox server (on the UPS) and a 12v powered Proxmox server (on a car battery / home made UPS).
My problem was getting to run NUT server on the 12v Proxmox server OPNsense VM so that it monitors the UPS that is powering the 120v Proxmox server which hosts my primary OPNsense. The 12v OPNsense would always shut down when the 120v UPS would kick in even though it is on a different power source.
The 120v Proxmox server is the main server, which hosts many different VMs and LXC such as my primary OPNsense, FreePBX, Pihole, etc, and the 12v server is the "power outage backup router" that runs the backup OPNsense as well as the Omada controller to keep the APs running, Pihole and others light things, including NUT server.
My not-so-elegant solution :
- I have instealled the NUT server on a Debian VM on the 12v Proxmox server, with a USB passthrough of the port that goes to the UPS
- I have installed the client NUT package ONLY on the primary OPNsense so that it can shut down when there is a power outage, but not on the backup OPNsense.
- I have also created a very basic script that I have added to the crontab. It runs every minute to validate if the UPS is back on power because the "FSD OL" status would always kill my primary OPNsense when it was booting and can only be reset back to "OL" by restarting the daemon.
Here is the cron job script if you are interested. Simply adjust the UPS' name
Code Select
#!/bin/bash
upsstatus=$(upsc CP1500AVRLCD3@localhost 2>&1 | grep "ups.status:" | sed 's/^.*: //g')
echo "UPS Status : $upsstatus"
if [ "$upsstatus" = "FSD OL" ]; then
# echo "Restarting NUT daemon"
/etc/init.d/nut-server restart
else
echo "Doing nothing"
fi
I understand that this is not a real real solution to running the NUT server on OPNsense, but that is how I ended up doing it.
"