Hi everyone,
I am trying to create a shutdown script issued via ssh that will first shutdown all my vms as per the policies I have defined in the autostart/shutdown settings, and then power off the host.
After researching I found out that up until esxi 6.7 this could be achieved using /sbin/shutdown.sh && /sbin/poweroff .
However, shutdown.sh in esxi 7.0 is deprecated. This is what's in the script:
#The usage of shutdown.sh is deprecated!
#We keep the file only for legacy reasons. Do not add any new code.
So I tried to use host_shutdown.sh with only 2 test vm's running (a win10 machine and a debian machine) to see if they would shutdown gracefully before the host.
Results were mixed. The debian machine shutdown as it should, and stayed shut, and the win10 machine shutdown and reboot right after! The host did power off while the second machine was booting... I confirmed from the logs that the win10 machine started the reboot sequence 10seconds after it was shutdown, which is equal to the stop delay I had configured. The win10 was the last in order to shutdown.
Because this is a production server, I can't do many tests..Does anyone have experience with host_shutdown.sh in esxi 7.0? Is it the designated method for remotely shutting down vm's and then the host?
I haven't been able to find any relevant information on the web.
S.