Interesting thread.. this helped thank you guys.
I had a situation as below :
A cluster of 3 ESX 4.1 in a data center and each data center has its own UPS
The requirement was to turn off HA first, smoot powerdown VMs and then power down host.
/etc/opt/init.d/vmware-aam shutdown ; vmware-cmd -l | while read i ; do vmware-cmd $i stop trysoft && /sbin/shutdown -hP now ; done
I run this and seen working well for me and on one of my customers machine.
Disclaimer : written as hobby neither VMware nor I are responsible for if any damages caused.
Hope it helps