My APC UPSs all have the APC SNMP card so they are able to communicate over the network. From what I've been able to find the PowerChute program alerts the guest OS that a power outage has occurred but not a VM host. I'd rather alert the host (or vCenter) so vCenter can manage the power.
I honestly don't know if vCenter can do what I want it to do (with Enterprise licenses) but what I'd like to have happen is this:
- Shutdown non-essential VMs.
- Migrate essential VMs to as few hosts as possible. (In my case I have only two.)
- Power down the unused host.
APC provides the software Powerchute Network Shutdown for this usage, where you install the agent on the vSphere Management Assistant as it's no longer possible to install software directly on ESXi.
EDIT: I'm not sure if the Powerchute software can shut down machines according to priorities etc, but I remember the MGE software (also on a vMA) could do it. Give it a go and see what happens!