<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2]]></title><description><![CDATA[<p dir="auto">Hey there,<br />
I have a  very specific question:<br />
Is there a way to get PowerChute running on a XCP-ng Host? I already found this article from Citrix:<br />
<a href="https://support.citrix.com/article/CTX119910" target="_blank" rel="noopener noreferrer nofollow ugc">https://support.citrix.com/article/CTX119910</a><br />
and this from APC:<br />
<a href="https://www.apc.com/us/en/faqs/FA159764/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.apc.com/us/en/faqs/FA159764/</a></p>
<p dir="auto">The problem is I don't have a Network Management Card installed or the possibility of adding one. I'm dependent on a USB Connection. So I was wondering <strong>how</strong> I can configure a shutdown of all VMs and the Host with a USB Connection? It's important for me to understand the process. Do I need an seperate PC to manage this? Is there a solution with USB passthrough and one VM executes a shutdown script on the Host? I would be thankful on some help/related articles or anything you can give me to figure it out myself.</p>
<p dir="auto">I'm running on XCP-ng Version 8.2 an I have a APC Back-UPS 700.</p>
]]></description><link>https://xcp-ng.org/forum/topic/4300/performing-automated-shutdown-during-a-power-failure-using-a-usb-ups-with-nut-xcp-ng-8-2</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 06:15:09 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/4300.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Mar 2021 13:19:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Sat, 25 Jul 2026 14:25:44 GMT]]></title><description><![CDATA[<p dir="auto">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.<br />
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.</p>
<p dir="auto">That being said, Thanks to VATES and all who have worked on solutions for this! It truly benefits everyone!</p>
]]></description><link>https://xcp-ng.org/forum/post/107243</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/107243</guid><dc:creator><![CDATA[datacare]]></dc:creator><pubDate>Sat, 25 Jul 2026 14:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Tue, 16 Jun 2026 10:01:19 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
]]></description><link>https://xcp-ng.org/forum/post/106268</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/106268</guid><dc:creator><![CDATA[Strebor]]></dc:creator><pubDate>Tue, 16 Jun 2026 10:01:19 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Wed, 15 Oct 2025 06:27:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/forza" aria-label="Profile: Forza">@<bdi>Forza</bdi></a><br />
Yes it can<br />
This is how I do it<br />
<a href="https://xcp-ng.org/forum/topic/10834/apcupsd-install/9">https://xcp-ng.org/forum/topic/10834/apcupsd-install/9</a></p>
]]></description><link>https://xcp-ng.org/forum/post/98483</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98483</guid><dc:creator><![CDATA[ph7]]></dc:creator><pubDate>Wed, 15 Oct 2025 06:27:34 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Tue, 14 Oct 2025 18:38:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/samuelolavo" aria-label="Profile: samuelolavo">@<bdi>samuelolavo</bdi></a>, 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>
]]></description><link>https://xcp-ng.org/forum/post/98469</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98469</guid><dc:creator><![CDATA[Forza]]></dc:creator><pubDate>Tue, 14 Oct 2025 18:38:31 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Tue, 14 Oct 2025 15:44:14 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">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:<br />
<a href="https://github.com/samuel-olavo/xcp-ng-nutclient" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/samuel-olavo/xcp-ng-nutclient</a></p>
<p dir="auto">This method worked for me — tested and confirmed.</p>
<p dir="auto">Thanks everyone!</p>
]]></description><link>https://xcp-ng.org/forum/post/98464</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98464</guid><dc:creator><![CDATA[samuelolavo]]></dc:creator><pubDate>Tue, 14 Oct 2025 15:44:14 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Mon, 16 Dec 2024 22:41:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/nomad" aria-label="Profile: nomad">@<bdi>nomad</bdi></a> What do you mean by the grand reconfiguration? Is there a new version that changes how things work?</p>
]]></description><link>https://xcp-ng.org/forum/post/87005</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87005</guid><dc:creator><![CDATA[CodeMercenary]]></dc:creator><pubDate>Mon, 16 Dec 2024 22:41:06 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Mon, 16 Dec 2024 22:10:08 GMT]]></title><description><![CDATA[<p dir="auto">After NUT's grand reconfiguration there are a few things that you need to be aware of:</p>
<p dir="auto">In order to run NUT as a monitor to shut down your XCP-ng hypervisors it is no longer sufficient to just install <code>nut-client</code> and enable <code>nut-monitor</code>.</p>
<p dir="auto">You also need to install <code>nut</code> and enable <code>nut.target</code> or <code>nut-monitor</code> won't autostart. There won't be anything in <code>journalctl</code> either, since it isn't even trying to start - the thing that tells it to do so is the <code>nut.target</code> and if that's missing nothing will ever trigger.</p>
<pre><code>yum install nut nut-client --enablerepo=epel
</code></pre>
<p dir="auto">make your edits in <code>nut.conf</code> and <code>upsmon.conf</code> then</p>
<pre><code>systemctl enable nut.target 
systemctl enable nut-monitor 
systemctl start nut-monitor
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/87002</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/87002</guid><dc:creator><![CDATA[nomad]]></dc:creator><pubDate>Mon, 16 Dec 2024 22:10:08 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Thu, 09 Mar 2023 18:04:25 GMT]]></title><description><![CDATA[<p dir="auto">Which chain? The development is open, if you want something, do it <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2bdbead4301" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> 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.</p>
]]></description><link>https://xcp-ng.org/forum/post/59766</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59766</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Thu, 09 Mar 2023 18:04:25 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Thu, 09 Mar 2023 16:55:45 GMT]]></title><description><![CDATA[<p dir="auto">Well I still don't think it is out of scope then for just the <strong>NUT client</strong> for enterprises or HomeLabs on XCP-NG.</p>
<p dir="auto">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 <em>seems</em> 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).</p>
<p dir="auto">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. <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a></p>
]]></description><link>https://xcp-ng.org/forum/post/59762</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59762</guid><dc:creator><![CDATA[odeawan]]></dc:creator><pubDate>Thu, 09 Mar 2023 16:55:45 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Tue, 07 Mar 2023 18:32:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/odeawan" aria-label="Profile: odeawan">@<bdi>odeawan</bdi></a> 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.<br />
So running this scenario is the most redundant and efficient way.</p>
]]></description><link>https://xcp-ng.org/forum/post/59700</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59700</guid><dc:creator><![CDATA[Hannes_5253]]></dc:creator><pubDate>Tue, 07 Mar 2023 18:32:13 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Tue, 07 Mar 2023 17:24:02 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
]]></description><link>https://xcp-ng.org/forum/post/59694</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59694</guid><dc:creator><![CDATA[odeawan]]></dc:creator><pubDate>Tue, 07 Mar 2023 17:24:02 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Sat, 25 Feb 2023 09:22:36 GMT]]></title><description><![CDATA[<p dir="auto">I'm not saying it's not important in general (it depends on the use cases) <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2bdbead4301" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> 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.</p>
<p dir="auto">And as usual, contributions are always welcome!</p>
]]></description><link>https://xcp-ng.org/forum/post/59140</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59140</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 25 Feb 2023 09:22:36 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Fri, 24 Feb 2023 21:01:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/gskger" aria-label="Profile: gskger">@<bdi>gskger</bdi></a> 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.<br />
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.</p>
]]></description><link>https://xcp-ng.org/forum/post/59135</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59135</guid><dc:creator><![CDATA[2b2bff]]></dc:creator><pubDate>Fri, 24 Feb 2023 21:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Fri, 24 Feb 2023 20:13:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/2b2bff" aria-label="Profile: 2b2bff">@<bdi>2b2bff</bdi></a> I think that there are still some business scenarios, where this functionality would come in handy.</p>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">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).</p>
]]></description><link>https://xcp-ng.org/forum/post/59134</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59134</guid><dc:creator><![CDATA[gskger]]></dc:creator><pubDate>Fri, 24 Feb 2023 20:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Fri, 24 Feb 2023 18:50:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> in simple words: they just don't shut down. And if they would have to there are bigger problems to solve.<br />
Thanks for answering...</p>
]]></description><link>https://xcp-ng.org/forum/post/59131</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59131</guid><dc:creator><![CDATA[2b2bff]]></dc:creator><pubDate>Fri, 24 Feb 2023 18:50:11 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Fri, 24 Feb 2023 12:28:48 GMT]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">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).</p>
<p dir="auto">So in a colo, you will never have to get your own UPS.</p>
]]></description><link>https://xcp-ng.org/forum/post/59110</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59110</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Fri, 24 Feb 2023 12:28:48 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Fri, 24 Feb 2023 10:53:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> I wonder how datacenters are doing this then in case of power loss? Or isn't that something of their concern?</p>
]]></description><link>https://xcp-ng.org/forum/post/59107</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/59107</guid><dc:creator><![CDATA[2b2bff]]></dc:creator><pubDate>Fri, 24 Feb 2023 10:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Mon, 20 Feb 2023 10:09:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Sadly, this use case is more meant for "non server-grade", where your machine isn't hosted in a datacenter (which is the default XCP-ng target/market).</p>
<p dir="auto">However, I'm not against helping people doing the configuration or having an official guide to document it (I mean, in our doc)</p>
<p dir="auto">Keep in mind we are always trying to find a balance between maintaining something (meaning time+money over other features) vs where the money is coming from (companies paying for support). If we pre-install all of this, it means we'll need to maintain it, while we still have a huge backlog of critical feature for our main (paying) target <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2bdbead4301" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> I hope you understand. Also, if we succeed and continue to grow that way with a far larger team than today, we could probably use that extra money from companies to improve integrations for the rest. But before doing it, we need to focus.</p>
]]></description><link>https://xcp-ng.org/forum/post/58940</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/58940</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Mon, 20 Feb 2023 10:09:34 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Mon, 20 Feb 2023 05:47:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/lknite" aria-label="Profile: lknite">@<bdi>lknite</bdi></a> Glad I could help and I agree. <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f44d.png?v=2bdbead4301" class="not-responsive emoji emoji-android emoji--+1" style="height:23px;width:auto;vertical-align:middle" title="👍" alt="👍" /><img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f3fb.png?v=2bdbead4301" class="not-responsive emoji emoji-android emoji--skin-tone-2" style="height:23px;width:auto;vertical-align:middle" title="🏻" alt="🏻" /></p>
]]></description><link>https://xcp-ng.org/forum/post/58934</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/58934</guid><dc:creator><![CDATA[Hannes_5253]]></dc:creator><pubDate>Mon, 20 Feb 2023 05:47:03 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Mon, 20 Feb 2023 00:50:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/hannes_5253" aria-label="Profile: Hannes_5253">@<bdi>Hannes_5253</bdi></a> awesome!  Thank you for this posting, it's helping me to get a nut client installed.  Note for folks coming across this later I needed to use the following to install the nut-client:</p>
<pre><code>yum -y install nut-client --enablerepo=epel
</code></pre>
<p dir="auto">It would be cool if xcp-ng came pre-installed with nut-client and a default configuration that shuts down the xen server &amp; turns off the ups after it finishes shutting down... similar to how truenas has a service which can be enabled to do so.  You'd have to configure it of course, with the nut server to monitor, credentials, and some other options such as whether to actually powerdown the ups after shutting down or not, but maybe through a nice gui after turning it on.  Seems like everyone should be using this setup ... just a matter of time till they are ready to.</p>
<p dir="auto">Another reason this would be nice to be integrated, is that docs recommend setting up a user account for nut, one for the monitor so clients can access and another for the shutdown so one of the watchers doesn't change the shutdown script &amp; nut provides a file that indicates when the ups should shutdown, so having that be the same on all xcp-ng systems rather than custom solution would be good.</p>
]]></description><link>https://xcp-ng.org/forum/post/58933</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/58933</guid><dc:creator><![CDATA[lknite]]></dc:creator><pubDate>Mon, 20 Feb 2023 00:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Sat, 03 Jun 2023 02:51:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a><br />
I wrote down the to-dos. You can use it for the official docs if you like! When you have questions, just answer on this Post.</p>
<p dir="auto"><strong>Network UPS Tools</strong><br />
<strong>Installation on XCP-ng Host</strong></p>
<p dir="auto">At first: Connect your UPS.<br />
Then run this commands to install NUT:</p>
<pre><code>yum update

yum –enablerepo=* install epel-release

yum install nut

yum install nut-client

cd /etc/ups

wget https://github.com/serrc-techops/NUT-Configuration/blob/master/slave/xen/xen-shutdown.sh

chmod +x xen-shutdown.sh
</code></pre>
<p dir="auto"><strong>Important Commands</strong></p>
<ul>
<li>
<p dir="auto">upsc apcups (check UPS connection)</p>
</li>
<li>
<p dir="auto">systemctl restart nut-server<br />
(NUT-server reboot) | (Use this to apply configuration changes and to connect the UPS after System startup)</p>
</li>
<li>
<p dir="auto">systemctl restart nut-monitor (NUT-monitor restart)</p>
</li>
<li>
<p dir="auto">nut-scacnner -U (shows connected devices)</p>
</li>
</ul>
<p dir="auto"><strong>Configure the files stored in /etc/ups like this:</strong><br />
<em>upsmon.conf</em></p>
<pre><code>RUN_AS_USER root
MONITOR apcups@localhost 1 admin [PASSWORD] master
SHUTDOWNCMD „/etc/ups/xen-shutdown.sh“
</code></pre>
<p dir="auto"><em>nut.conf</em></p>
<pre><code>MODE=netserver
</code></pre>
<p dir="auto"><em>ups.conf</em></p>
<pre><code>pollinterval = 1
maxretry = 3
[apcups]
driver = usbhid-ups 
#-&gt;when you use USB devices
port = auto
desc = „[NAME]“
vendorid = [VENDORID]
productid = [PRODUCTID]
serial = „[SERIALNO]“
</code></pre>
<p dir="auto"><em>upsd.conf</em></p>
<pre><code>LISTEN 0.0.0.0 3493
</code></pre>
<p dir="auto"><em>upsd.users</em></p>
<pre><code>[admin]
password = [PASSWORD]
actions = set
actions= fsd
instcmds = ALL
</code></pre>
<p dir="auto"><strong>Finish config Changes</strong></p>
<pre><code>systemctl restart nut-server
systemctl restart nut-monitor
</code></pre>
<p dir="auto"><strong>Finished</strong><br />
Good to know: You can now also connect to your NUT server via the pfSense plugin by using the credentials in uspd.users to have a gui for your UPS. To do this you have to open up Port 3493 on your host.<br />
Run this command to open the Port:</p>
<pre><code>iptables -I INPUT -p tcp -m tcp --dport 3493 -j ACCEPT
</code></pre>
<p dir="auto">Then save your changes to a config file and adjust Year, Month and Day in the config name. In my case it's the 22th of december in 2022:</p>
<pre><code>iptables-save &gt; /etc/sysconfig/iptables
mkdir /etc/iptables/
iptables-save &gt; /etc/iptables/rules_2022-12-22_INPUT_ACCEPT_3493_NUT.v4 --&gt; Optional, extra saving for Backups.
</code></pre>
<p dir="auto">I recommend using this convention of naming your rule files. Its a lot easier to track your changes and to restore files.</p>
]]></description><link>https://xcp-ng.org/forum/post/54719</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/54719</guid><dc:creator><![CDATA[Hannes_5253]]></dc:creator><pubDate>Sat, 03 Jun 2023 02:51:21 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Sun, 23 Oct 2022 09:42:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> Oh man, only saw this answer because I went back to my old post. I will do a full guide when I have some time and send it to you.</p>
]]></description><link>https://xcp-ng.org/forum/post/54138</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/54138</guid><dc:creator><![CDATA[Hannes_5253]]></dc:creator><pubDate>Sun, 23 Oct 2022 09:42:13 GMT</pubDate></item><item><title><![CDATA[Reply to Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2 on Fri, 11 Jun 2021 15:38:42 GMT]]></title><description><![CDATA[<p dir="auto">I was able to make NUT work with XCP-NG.  I used and followed the instructions in this post.</p>
<p dir="auto">On issuing the command:</p>
<pre><code>[21:56 xenserver1 ups]# ./xen-shutdown.sh 
</code></pre>
<p dir="auto">All VMs shutdown EXCEPT for the Xen Orchestra. I tried remove and reinstall Xen Tools</p>
<pre><code>apt install xe-guest-utilities
</code></pre>
<p dir="auto">I'm on Ubuntu 18.04</p>
<p dir="auto">Is there something that should be done with Xen Orchestra? Like I said, all other VMs shutdown quickly and properly.  I only have Ubuntu 18.04 and one instance of FreePBX.  FreePBX shutdown properly too.</p>
<p dir="auto">Update: it seems that after 5-10 minutes (not sure yet as I haven't timed it), the entire XCP-NG does shutdown but not sure if it was a forced of graceful shutdown on the VM running XO.</p>
]]></description><link>https://xcp-ng.org/forum/post/40089</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/40089</guid><dc:creator><![CDATA[okynnor]]></dc:creator><pubDate>Fri, 11 Jun 2021 15:38:42 GMT</pubDate></item></channel></rss>