This document is syndicated from lamw over on VMware Communities.
Original document ESX/ESXi APC/APCUPSD Host Shutdown VI Perl Toolkit Script |
|---|
Many parties have looked for the possibility of monitoring power continuity and subsequently reacting to power outages with information supplied by a UPS agent installed in a virtual machine running on a free version of ESXi. Currently, one free solution How to configure ESXi to shutdown using an APC SmartUPS created by Joseph Holland facilitates shutdown/suspend procedures for online virtual machines in the event of a power outage given that there is some type of physical UPS system in place to provide backup power to the ESXi server. Joseph’s solution utilizes VMware VIMA and the open source utility apcupsd however, one needs to enable the unsupported SSH console in ESXi and setup paired SSH keys between VIMA and host to utilize it. Enabling the unsupported SSH console may not be the preferred method for some end users with respect to their support contracts held with VMware.
The following solution outlined in this document is similar to Joseph’s work although it will not necessitate enabling the unsupported SSH console on the ESXi hosts. This is made possible by utilizing the VI Perl Toolkit to communicate with the ESXi hosts. The only possible drawback however is that next revision of ESXi may disallow write operations and require that the user purchase ESXi license(s) to make full use of the VI API (read/write).
It must be pointed out that this implementation is built on top of initial findings made by Joseph Holland (APC VIOPS documentation) and Andrew Sullivan (VMware VIMA VI Fastpass disection). Please do visit Andrew’s blog at get-admin. Thanks to Duncan Epping for nudging the challenge via Twitter ;)...
Note: Please ensure proper testing has been performed in a staging or development environment prior to implementing this solution in a production environment.
VMware Certified Professionals (VCP) and datacenter administrators.
This the outline of the original doc ESX/ESXi APC/APCUPSD Host Shutdown VI Perl Toolkit Script
Requirements
Usage
Overview of the scripts
Scenario
Setup
Sample output
Attached scripts - upsVIShutdown.pl and ghettoShutdown.pl
You can find this doc on the web @ How to shutdown ESX/ESXi from APCUPDS using VI Perl Toolkit
The original syndicated document is at http://communities.vmware.com/docs/DOC-9531
Read Joseph Holland's alternative approach to solving this problem How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)
lamw, Production Support Engineer, http://engineering.ucsb.edu/~duonglt/vmware/
There are no comments on this document