X

Clean shutdown of vmWare ESXi with APC UPS

We are updating all our vmWare hosts to be sure that they are correctly shut down using an APC SmartUPS.

At first glance it appears that you need a VMA instance installed on the vmWare box.  Then, using Linux commands, install and configure PowerChute Business Edition on the VMA.  This will then allow you to connect to the UPS and shutdown the VMs gracefully.

One downside of working this way however is the increased support requirement, additional VM and the resources required to run the additional VM.

So, we have configured our APC SmartUPS with vmWare ESX in a different way…

  1. Connect the SmartUPS to the vmWare physical box via USB cable.
  2. Configure vmWare to pass through the USB controller to one of our VM hosts (our SBS Server in this example as it is always on and required for our network).
  3. Configured vmWare to pass through the APC SmartUPS to the same VM host (our SBS Server).
  4. Install all 3 parts of PowerChute Business Edition on the SBS server and connected to USB SmartUPS.
  5. Install Putty (the full installer) on the windows server (SBS server)
  6. Install (or be sure it is installed) VM Tools on all the VMs on this host.
  7. Enable the SSH service on the VM Host using vSphere (Configuration -> Security Profile -> Services)
  8. Set all VMs to ‘Guest Shutdown’
  9. Create a new file in C:\Program Files (x86)\APC\PowerChute Business Edition\agent\cmdfiles called shutdown_vm.cmd and add content as follows:
    @ECHO OFF
    CD “C:\Program Files (x86)\PuTTY”
    @START plink.exe -ssh -pw <password> root@192.168.100.11 “/sbin/shutdown.sh; /sbin/poweroff”
  10. Test the command file manually from a command prompt to be sure that it runs!
  11. Set PowerChute shutdown mode to Preserve Battery (or it won’t run the shutdown schedule!) (maybe?!)
  12. Set PowerChute Agent Service to ‘interact with desktop’
  13. Prepare servers for testing (ensure everyone is logged off)
  14. Edit PowerChute Business Edition shutdown sequence and include command file and select the script shutdown_vm.cmd
  15. Test the command from the shutdown schedule to be sure all servers in the command shut down properly

Want to speak to us on the phone?

Please contact us and we can discuss your requirements!

High Wycombe & South Bucks

Aylesbury & North Bucks

  • Aylesbury
  • Buckingham
  • Milton Keynes
  • Leighton Buzzard

Thame & Oxfordshire

  • Thame
  • Oxford
  • Witney
  • Didcot

London & Home Counties

  • London
  • Watford
  • Uxbridge
  • Rickmansworth