Install NUT directly on Proxmox VE and control guests from here

yunmkfed

Member
Sep 2, 2023
81
11
8
www.alanbonnici.com
Hi,

I followed the tutorial at https://youtu.be/vyBP7wpN72c?si=dqMMot6WV3chdpAP (no connection to presenter). It was very detailed.

My use case is a single Proxmox server connected to a single UPS running 3 VMs (2 Windows, 1 Ubuntu).

Is it possible to install NUT directly on Proxmox and simply trigger Proxmox to gracefully shutdown the Guest OSs when there is a power failure and then power down itself? Is there a tutorial / guide I can follow?

Thanks
 
  • Like
Reactions: Kingneutron
Hi, thank you so much for this post it is exactly what I am looking for, I would like to ask for a little bit of help though. I have set up one of my Synology NAS' as my NUT server as they don't seem to play nicely without customization as being the client. Would appreciate if you could help me with that in any way?
 
Ok, just tell me what you are looking for, and we see what we can do.

What actually happens when the system detects the server is running on battery?
Which scripts are executed? How is the PVE server supposed to shut down properly?

I tested the software and it detects nicely the UPS. Much simpler as the cumbersome NUT or APCUPSD.
I'd like to use it but need to know more details.

Does the tool come with a possibility to start shutdown sequence at a defined time on battery, like 2 minutes?
 
Hi Everyone ! just configure the CT following this nice and easy tutorial, looks like everything works fine nut client and cgi OK but when i try to send the command upmon -c fsd in PVE shell i got this message and nothing happened !!
####
root@pve:~# upsmon -c fsd
Network UPS Tools upsmon 2.8.0
fopen /run/nut/upsmon.pid: No such file or directory
###
Any idea ?
Thanks
 
As of today: https://code.foss.global/serve.zone...2a5da586b96a231d391f12eb1bb/ts/daemon.ts#L587

Again: Feel free to note down specific wanted features. We can take a look at it with the next release version.

All right, here is my wishlist:

  1. Add an optional call to a custom script when shutdown was initiated. This will be used to shutdown all VMs within (hopefully) shutdownDelayMinutes time.
  2. Implement a timer to start shutdown sequence after n seconds on battery. Whatever threshold comes first (battery, runtime, timeout)

Bonus:

The output of "nupst status" is ugly in the section "Service Status":

1752086927954.png

I think the easiest would be to call something like
Code:
systemctl show nupst.service --no-page -p ActiveState,SubState,UnitFileState
and pretty-format the output :)

"nupst logs" will show the logs anyway...

With these changes the software can easily be used properly in production :cool:

Thank you!