From de47dceab22ad83ad94deb2e579a0b5728afe2dd Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 7 May 2023 18:37:51 -0500 Subject: [PATCH] update --- esxi-scripts/iscsi-vm-shutdown.ps1 | 2 +- powerwall.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/esxi-scripts/iscsi-vm-shutdown.ps1 b/esxi-scripts/iscsi-vm-shutdown.ps1 index db6da150..5fac0de8 100755 --- a/esxi-scripts/iscsi-vm-shutdown.ps1 +++ b/esxi-scripts/iscsi-vm-shutdown.ps1 @@ -4,4 +4,4 @@ Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword -Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} +Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false diff --git a/powerwall.sh b/powerwall.sh index 88e16240..15a11f0e 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -295,7 +295,10 @@ SHUTDOWN_SERVER(){ ISCSIVMSHUTDOWN(){ for ESXIHOST in "${ESXIHOSTS[@]}"; do - /opt/idssys/powerwall/esxi-scripts/iscsi-vm-shutdown.ps1 ${ESXIHOST} + echo -en "Shutting down any VM's on '${ESXIHOST}, that are running on an iSCSI drive ... " + # /opt/idssys/powerwall/esxi-scripts/iscsi-vm-shutdown.ps1 ${ESXIHOST} >/dev/null 2>&1 + echo "DONE" + echo done }