A shell script to gracefully shutdown all VMs on an ESXi host, followed by the host itself. Works great for maintenance operations or automated shutdowns in case of emergencies / power loss.
New versions of ESXI do not allow root to run scripts from the datastore. Even after making executable this will result in "Operation not permitted" when you attempt to call either of the scripts (locally or remotely via ssh).
If you add the scripts to a new root level folder e.g. "/tools" and make them executable they can be run, but of course this folder and files will not be there after a reboot.
I did try to use the start up script /etc/rc.local.d/local.sh to recreate the directory and copy the files from the data store but this did not appear to run - the folder was not there after a reboot.
Is there a persistent file location that is not on a datastore where the scripts can be kept and where root can run them?
VMware ESXi 8.0.0 build-20513097
VMware ESXi 8.0 GA