Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Dell T610 running ESXi4, an APC Smart UPS 1000VA and a local "console" machine running Vista and the vSphere 4 Essentials pack. A dedicated management network is in place between the T610 and the Vista machine. The UPS has a USB and serial port. Currently it's connected to the console machine via USB.

We have 4 VMs: SBS 2003, Server 2003 running Terminal Services, and two XP Machines.

Ideally, when the UPS is forced to use battery power [for a set number minutes], I would like to gracefully shutdown all the VMs, then the ESXi, then the console machine. The latter two are not strictly a priority, but the VMs within ESXi are.

Google provided lots of deprecated scripts that used to work on ESXi 3.x or similar, however I am unable to find what they were deprecated by.

  • What do I need to be able to do this? I have Powerchute Express as supplied with the UPS, but would be willing to pay for software if required.
share|improve this question
    
des the UPS have a network port? –  lepole Apr 28 '10 at 9:20
    
Edited question to answer lepole; there is no network port, but there are USB and serial ports. –  Tim Apr 28 '10 at 10:38
add comment

2 Answers

The UPS software is able to fire off a script at a point of your choosing after switching to batteries. Simply use that script to send appropriate commands. Rather than shut down the clients you could tell VMWare to save the current system state of the clients. Alternatively, have the script send remote shutdown commands to the clients using something like shutdown.exe or psshutdown.exe. Once those command are fired off have the script sleep for a suitable amount of time (sleep.exe) before shutting down the host.

share|improve this answer
add comment

as John pointed out, I would also use the Vista Client with Powerchute to trigger a script. You might want to look into Vmware Power CLI. Saving the state or powering down the VM is up to you, I´d say...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.