XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2

    Scheduled Pinned Locked Moved Compute
    34 Posts 17 Posters 29.9k Views 19 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      odeawan
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by 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.

        D 1 Reply Last reply Reply Quote 4
        • D Offline
          dj423 @olivierlambert
          last edited by dj423

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • N Offline
            nomad
            last edited by

            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 enable nut-monitor.

            You also need to install nut and enable nut.target or nut-monitor won't autostart. There won't be anything in journalctl either, since it isn't even trying to start - the thing that tells it to do so is the nut.target and if that's missing nothing will ever trigger.

            yum install nut nut-client --enablerepo=epel
            

            make your edits in nut.conf and upsmon.conf then

            systemctl enable nut.targetĀ 
            systemctl enable nut-monitorĀ 
            systemctl start nut-monitor
            
            C 1 Reply Last reply Reply Quote 0
            • C Offline
              CodeMercenary @nomad
              last edited by

              @nomad What do you mean by the grand reconfiguration? Is there a new version that changes how things work?

              1 Reply Last reply Reply Quote 0
              • F FritzGerald referenced this topic on
              • samuelolavoS Offline
                samuelolavo
                last edited by

                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-nutclient

                This method worked for me — tested and confirmed.

                Thanks everyone!

                ForzaF 1 Reply Last reply Reply Quote 4
                • ForzaF Offline
                  Forza @samuelolavo
                  last edited by Forza

                  @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.

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    ph7 @Forza
                    last edited by

                    @Forza
                    Yes it can
                    This is how I do it
                    https://xcp-ng.org/forum/topic/10834/apcupsd-install/9

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Strebor
                      last edited by

                      For people running XCP-ng, wanting to use NUT client to power down gracefully during longer power outages, it could be interesting to note that Unifi now has two very affordable UPS models that feature a built in NUT server. So no need to run your own NUT server.

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        datacare
                        last edited by

                        I have been in the Network Enterprise business for 28 years. I live in Virginia which is heavily populated with Data Centers and adding more all the time.
                        However, we have quite a few customers especially municipalities which are saying NO to having anything hosted with cloud computing due to security and endless rising cost. We have been deploying xcp-ng in quite a few installations, on customer premise. I think VATES will find there is a whole other market in these areas they can reach.

                        That being said, Thanks to VATES and all who have worked on solutions for this! It truly benefits everyone!

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better šŸ’—

                        Register Login
                        • First post
                          Last post