Script to shutdown VMware guests

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.