Use this script to gracefully shutdown your servers running on your VMware hosts. (VMware tools has to be installed although)
VMLIST=’vmware-cmd -l’
for config in ${VMLIST}
do
vmware-cmd $config stop trysoft
done
vimsh -n -e /hostsvc/maintenance_mode_enter
shutdown -h now