• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

ups

VIMA and the UPS initiated shutdown, the “lamw” version

Duncan Epping · Feb 19, 2009 ·

I already predicted that this was bound to happen sooner or later. It only took William Lam, aka lamw, a couple of days to enhance the work that Joseph Holland did. Joseph wrote a procedure that let’s APC’s software initiate a shutdown of the VM’s and ESXi host when a power failure occurs. Joseph’s solution included a modification of ESXi which means no VMware support.

I hinted William via twitter and he came up with a perl script that uses the API to initiate the shutdown of the VM’s and the ESXi host. This script will be run on the VIMA VM. There’s no need to change the ESXi host anymore!

ghettoShutdown.pl – This script initiates the shutdown of all VM(s) within an ESX/ESXi host excluding the virtual machine that’s monitoring the UPS device and then shutdowns the host. It accepts two commandline parameters: –sleep the duration in seconds to wait after a VM has initiated the shutdown before moving onto the next VM (shutdownVM() is non-blocking function) and –ups_vm the name of the displayName of your VM that is monotiring the UPS device [more details to come later].

upsVIShutdown.pl – This script is a wrapper which will hold the configurations of the order of hosts to shutdown. It may be used inconjunction with other UPS monitoring utility, though with our example, it’ll be placed in the apccontrol script to execute upon a power interuption.

Now head over to the VMware Communities, download the script and testdrive it! Awesome work William!

UPS(APC) initiated shutdown of ESXi

Duncan Epping · Feb 8, 2009 ·

I’ve been waiting for APC to create a VIMA ready package of their PowerChute Network Shutdown software for a while now. It’s supposed to be released soon but I haven’t heard a release date yet.

For everyone that can’t wait VMTN User “jholland” created this PDF “How to configure ESXi to shutdown using an APC SmartUPS“. It’s a great creative solution that shuts down your vm’s and host when a power failure occurs keep in mind you need a UPS with network management capabilities. In short:

  1. add a script to your ESXi box and enable ssh with public key authentication
  2. add a debian VM
  3. install APC UPS daemon
  4. edit the APC UPS daemon config file which calls the script(1.) via ssh/public key

I guess the APC solution will work in a similar way by the way, but the APC solution will be full supported and this solution clearly isn’t cause you would need to alter ESXi. (The APC solution will use the RCLI/Perl toolkit probably)

I can imagine you would want to use it anyway. Thanks to jholland for creating this PDF, it’s his first post I hope there’s more to come! (By the way, it isn’t that difficult to apply this information on VIMA. I might test it out this week and update you guys)

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2026 ยท Log in