as per specs, APC PCNS only works up to VS 5.5. Has anyone tried it with VS 6? Or is there any other way to gracefully shutdown an ESXi 6 Host through an UPS?
Thank you an best regards,
I did not try APC PCNS, but concerning other ways of handling UPS, there is "apcupsd", and "NUT" (which even has client vib-package for ESXi)...
Thank you, JarryG. However I have no idea what you are talking about. Do you possible a little more detailed information? Your help is greatly appreciated.
An ESXi host is not like a normal Win or Linux server.
You should not power down a ESXi host without first putting it in maintenance mode (all VMs must be powered off or vMotion to another host).
UPS controlled ESXi host shutdown can be very tricky as not many people put ESXi hosts under 1 UPS each....means 6 ESXi host with 6 UPS. If you put 6 ESXi host to 1 UPS....any UPS issues...u may have some very big issues as ALL VMs may start powering down. Even if you put staggered ESXi host shut down, you may see VMs being vMotion to other ESXi hosts....and what would you think will happen when u have 1 or 2 ESXi hosts holding all the VMs and it is forced to shut down ?
**BTW I am taking that you have set up the ESXi hosts to a shared storage using fast connectors like 10G iSCSI...so only the live VM state needs to be vMotion over.
Thank you. I am aware of that. What I am looking for is a simple solution for small environments w/o DRS or HA. In the past we you used to configure APC PCNS. This worked just fine: On certain UPS events, PCNS passed the shutdown command to the hosts. According to the stop/start VM settings, the host then first gracefully shut down the VM's and subsequently itself. Is there a solution under VS 6 for this ?
FYI, "apcupsd" is software very similar to APC's "PowerChute Network Shutdown", but it is free (open-source) and much more universal. It works not only with APC, but with many other UPS-models/vendors too:
"NUT" (aka "Network UPS Tool") is another free (open-source) tool for UPS-management, but this one has one big advantage over the previous one: there is native client for ESXi, so there is no need to have one VM to connect to ESXi using login/password to shutdown ESXi-host:
According to APC, this is not possible and you require Powerchute Network shutdown. We tried this a number of times with USB and found no solution.
VMWare has info here on using the APC approved solution.
Would also think SmartUPS would be a better choice and you can fit with network card. Naturally more money but if your servers are at all important, that cost should be worth it. Also gives you more monitoring and alerting which might be useful at a remote site. You also need to assure sufficient runtime for all VMs to cleanly shutdown and then shutdown the host
I have recent set up ESXi 6 auto shutdown using the APC PRO 1500 with the included PowerChute Personal Edition software.
bash -c -l '/mnt/c/<location of script>/execute.bat
ssh root@<ip address of server> /shutdown.sh
taskkill /im cmd.exe
(almost 3 years later...)
Hi Pigman, I liked the elegance of your solution and currently I am trying to get it to work. I run into a few hiccups.
First, the 2nd line in execute.bat refers to execute.bat itself. Shouldn't it refer to the name of a bash shell script?
Second, it seems cmd.exe instances that are run from Task Scheduler are sand-boxed these days. Running execute.bat and then stop.bat from command line works perfectly. But when I trigger 'run now' for both in the Task Scheduler, the stop.bat will not kill the running bash task and sub processes, so the shutdown will progress, even if power is restored.
Did anyone run into this too? How did you solve it?