Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2
-
In a DC, you have usually 2x power feed per rack (one on the left, one on the right). So even if one power line/feed is down, it's not a problem, since all your machines are usually dual PSU.
Also, everything is backed by UPS (both feeds) inside the building, and then diesel generators are taking the load after 10/15 minutes (diesel takes few minutes to start).
So in a colo, you will never have to get your own UPS.
-
@olivierlambert in simple words: they just don't shut down. And if they would have to there are bigger problems to solve.
Thanks for answering... -
@2b2bff I think that there are still some business scenarios, where this functionality would come in handy.
For example, we are running server rooms at our main production sites worldwide (no data centers, no colo, all on-site). Each features a three VMware hosts cluster with shared storage, backup, switches, and firewalls in an air-conditioned server room with adequate fire prevention/protection. All have two power feeds (A and B or left and right as Olivier called them) and all systems have dual PSUs, but the sites usually have only one power supplier and no generators.
Feed A goes to an UPS and feed B directly to the power line. If the power goes down, the UPS automatically triggers the vCenter, storage and backup to shut down when the UPS remaining runtime is below a certain threshold.
But I can perfectly understand Oliviers reasoning and there are workarounds. It all depends on your risk appetite (if that is a word in English).
-
@gskger yeah same on my place. I play around with xcp-ng at home, where this is not important, and there is no UPS. So it is not important here.
But I have built two hosts at work in a server room as well. Together with TrueNAS and a couple of other things. The APC UPS has a management card, so it can be reached via network, but somehow the hosts have to shut down gracefully if needed. That's how I stumpled upon this thread in the first place. -
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!