From ESXi 3.5 Update 4 onwards VMware restricts RCLI (remote command line interface) administration access for the free version of ESXi.
To make PCNS (PowerChute Network Shutdown) work properly you will need to purchase a license for ESXi which can be anything other than ESXi free edition/vSphere Hypervisor. (New name for the free edition with vSphere 4.1)

Ok, fyi, a possible workaround:
Install a linux VM, connect the expensive, network-able APC UPS via USB to the ESXi server hosting the linux VM, pass through the USB to the VM, install the free powerchute agent on the linux and make it send shutdown commands to the vMA.

I don’t have a PCNSConfig.sh in /opt /APC/PowerChute/group1
Will this affect anything?
Also pcns is not accepting my credentials to log in?
Is there a way to reset the creds?
I tried this:

f you forget or lose your password, you can set a new one and also change the user name and
authentication phrase by editing the pcnsconfig.ini file. In the [NetworkManagementCard]
section of the INI file, set the following lines with your new values:
username= new user name
password= new password
authenticationPhrase= new authentication phrase
not reseting the auth phrase though, and it didn’t make any difference?
Any ideas

Not sure I understand the question correctly, but if you are asking why the virtual machine didn’t shutdown automatically when you shutdown the host via the APC software then that is because you need to either configure the host to shutdown the virtual machine with the host via the configuration tab or install the APC software inside the VM, then configure the APC network management software to shutdown the VM a few minutes before the host.

As Simon says, If you have a look at the Configuration tab in the ESXi vSphere client, you’ll see a link under Software…
Virtual Machine Startup/Shutdown.
If you click on that link, then click the Properties link.
You can configure … funnily enough … startup and shutdown of the VM’s.
In saying this, there is a known issue that this doesn’t work as expected.
See here link to VMware KB Article 1008182 (Virtual machines do not shut down gracefully) http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008182

As well as that, you may need to make sure you’re VMware tools (on the VM’s) are running the correct scripts.
By default the shutdown script does nothing.

For Windows guests:
If you have a look at the VMware Tools Properties->Scripts tab
You can see for the shutdown script, that it actually does nothing.
If you find that your Windows box is not shutting down cleanly…
Add a custom script to the “Shut Down Guest Operating System” Script Event
I just created a shutdown.bat with the following in it.
C:WindowsSystem32shutdown.exe -s -t 1
This cleared up any errors I was getting in my Windows7 logs.

I don’t understand the operation of VIMA and APC well, I already installed VIMA and agent APC. I add 2 host esxi with the command “sudo vifp addserver .” I enter to the agent’s configuration APC http://vimaIP:6547 to configure the events of shut down.
Does this configuration apply for all the esxi that are in the list of VIMA?
does all the host shut down?

Hi Simon,
Wonderful article and I’ve implemented the graceful shutdown via VMA couple of occasions within my solutions. My question to you on a different scenario if you could help me on…
I’ve got a client who has a free hyper visor of VMware 5.0 installed and couple of VM’s running on the box. However, there is no Smart UPS to configure graceful shutdown. What they have is a HP T1500 UPS connected to a different Windows 2003 host and only mgt you have is USB connected to the UPS. Now I can use a long power cable to source the power to the VMware hyper visor (Esxi) . How do I configure a graceful shutdown within this environment?
Kindly shed some light on this pls..
Cheers!
KC