I have installed nut on proxmox and managed to define the UPS. NUT successfuly executed a FSD, but not sure how to actually turn off the UPS, so an automatic poweron after power has returned would be executed.
What I don't fully understand:
1) Do I need to manually call upsdrvctl shutdown in some shutdown scripts? Am I supposed to do it in upssched-cmd?
2) When testing the shutdown sequence, I see that the UPS driver seems to be shutting down before the VM's are actually shut down. Is this correct? Why not after the VM's have stopped? Is there any way to get a callback after VM shutdown to initiate UPS shutdown?
What I don't fully understand:
1) Do I need to manually call upsdrvctl shutdown in some shutdown scripts? Am I supposed to do it in upssched-cmd?
2) When testing the shutdown sequence, I see that the UPS driver seems to be shutting down before the VM's are actually shut down. Is this correct? Why not after the VM's have stopped? Is there any way to get a callback after VM shutdown to initiate UPS shutdown?
Code:
Dec 11 16:13:17 proxmox-sz upsmon[1211]: UPS apc@localhost battery is low
Dec 11 16:13:17 proxmox-sz upsd[1208]: Client upsadmin@127.0.0.1 set FSD on UPS [apc]
Dec 11 16:13:17 proxmox-sz upssched[13178]: Executing command: lowbatt
Dec 11 16:13:17 proxmox-sz upssched-cmd: UPS on battery critical, forced shutdown
Dec 11 16:13:22 proxmox-sz upsmon[1211]: Executing automatic power-fail shutdown
Dec 11 16:13:22 proxmox-sz upsmon[1211]: Auto logout and shutdown proceeding
Dec 11 16:13:22 proxmox-sz upssched[13197]: Executing command: powerdown
Dec 11 16:13:22 proxmox-sz upssched-cmd: powerdown command
Dec 11 16:13:23 proxmox-sz systemd[1]: nut-monitor.service: Succeeded.
...
Dec 11 16:14:25 proxmox-sz systemd[1]: Stopping PVE guests...
...
Dec 11 16:18:30 proxmox-sz systemd[1]: Stopped PVE guests.