NUT experts, I would ask you if it is possible to run NUT server within a vm in a ESXI host. In case of power failure, the ESXI host must shut down, including all VMs.
But, VM acting as NUT Sever always shuts down after all clients have done (including the ESXI host itself). So this is my doubt.
Last night I set out to configure NUT (network ups tools) to get auto shutdown working in my lab.
My setup is as follows:
-
4 servers running ESXi 6.5, 1 of which is on 24x7
-
2 x APC XS1500 UPSs
-
1 x APC Smart-UPS 1000 (no nmc)
I set up a Debian VM on the 24x7 ESXi host and installed nut-server and nut-client on it. Passed through the USB connection from the more heavily loaded XS1500 UPS to it and believe I have nut-server running correctly (I can see UPS info using upsc command).
I also installed the nut client on the ESXi server and pointed it to the nut server running on the Debian VM.
Here's where I'm at currently, and some items I need help understanding:
-
When I run upsc on the ESXi host to query the UPS I get an error 'stale data'. Running the same upsc command on the nut server itself returns data as expected. Why am I getting different results from ESXi and how should I troubleshoot it?
-
Is there some way to actually test the nut client functionality in ESXi, short of unplugging the UPS and letting the battery run down?
-
If instead of using the nut client on the ESXi host I wanted to script the shutdown myself (i.e. have the nut server run a script to shutdown VMs and power down the ESXi host using vSphere CLI), how would I go about causing that script to execute at a certain time (i.e. if I wanted the script to run at 50% battery capacity for example)?
-
In terms of Windows PCs on the network and getting them to automatically shutdown based on the status of the battery connected to the nut server, what's the best way to accomplish that? I found a couple of Windows nut clients, but they're all very kludgy and out of date. I'm interested to hear how others are handling this.