This commit is contained in:
2023-11-01 08:57:40 -05:00
parent 3d7092a269
commit 53a141cecf
2 changed files with 27 additions and 1 deletions

View File

@@ -1131,7 +1131,11 @@ SHUTDOWN_SERVER(){
# ${PW_FOLDER}/esxi-scripts/iscsi-server-shutdown.ps1 ${hostip} >/dev/null 2>&1
fi
echo -e "${idsCL[Green]}Done\n"
echo -en "${idsCL[LightCyan]}Verifying no VMs remain on the host ... "
[ "${TEST}" != "true" ] && ${PW_FOLDER}/esxi-scripts/vm-shutdown-verify.ps1 ${hostip} >/dev/null 2>&1
echo -e "${idsCL[Green]}Done\n"
echo -en "${idsCL[LightCyan]}Shutting down Host ... "
[ "${TEST}" != "true" ] && ssh root@${hostip} 'esxcli system shutdown poweroff -d 10 -r "Automated ESXi host shutdown"' & >/dev/null 2>&1
echo -e "${idsCL[Green]}Host will begin shutdown in 10secs\n"