Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2
-
I'm not saying it's not important in general (it depends on the use cases)
But in our priorities (the "regular" DC world), it is not. For the "Edge computing" case, it might be more important, but the word "focus" doesn't have any meaning if we do everything at the same time.
And as usual, contributions are always welcome!
-
Would just having the nut client be sufficient enough on the base XCP-NG to tigger a shutdown via NUT? Maintaining the NUT server seems to be a hold up and add extra complexity for XCP-NG. We all may have different DC power situations, but we could all use tools in our belt at home or the data center.
-
@odeawan Sure but you need a nut server. When you use the XCP-NG Server as a client you have to install the nut server on a different system. You can't install the nut server on a vm on the same host because the nut server must be installed on a system to shut down last.
So running this scenario is the most redundant and efficient way. -
Well I still don't think it is out of scope then for just the NUT client for enterprises or HomeLabs on XCP-NG.
SBCs are everywhere these days. Using a Raspberry Pi as the NUT Server in a homelab or a flavor of a more robust server for NUT seems like a solid choice. No USB passthrough to worry about, uptime on a 1500VA+ UPS, forget about it! There are a handful of guides how to get it running for a Pi or anything else (including this post).
As I think this though, I would still feel ok with another external device watching, waiting, and notifying me on a successful power off of any number of my hosts and VMs. Not all enterprises or homelabs can afford (even if their appetites want it) to get enterprise level power automations. We have our power. Break the chain. @olivierlambert
-
Which chain? The development is open, if you want something, do it
If you want to be the maintainer so we can have it updated, packaged and put in our repo (even if not bundled by default), go ahead! If we think there's people behind it, we are not against, since it's an extra package.
-
This post is deleted! -
After NUT's grand reconfiguration there are a few things that you need to be aware of:
In order to run NUT as a monitor to shut down your XCP-ng hypervisors it is no longer sufficient to just install
nut-client
and enablenut-monitor
.You also need to install
nut
and enablenut.target
ornut-monitor
won't autostart. There won't be anything injournalctl
either, since it isn't even trying to start - the thing that tells it to do so is thenut.target
and if that's missing nothing will ever trigger.yum install nut nut-client --enablerepo=epel
make your edits in
nut.conf
andupsmon.conf
thensystemctl enable nut.targetĀ systemctl enable nut-monitorĀ systemctl start nut-monitor
-
@nomad What do you mean by the grand reconfiguration? Is there a new version that changes how things work?
-
-
Hello,
Iāve been configuring NUT on XCP-ng 8.3 and had some trouble finding proper documentation. However, after going through the messages in this forum, I created a document that I believe might help others set up the NUT client on XCP-ng 8.3:
https://github.com/samuel-olavo/xcp-ng-nutclientThis method worked for me ā tested and confirmed.
Thanks everyone!
-
@samuelolavo, nice work! I wonder if it can be improved by using an independent machine/unit and login remotely via ssh and execute the script? This way we need no modification on xcp-ng dom0 itself.