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}
vmware-cmd $config stop trysoft
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.