This commit is contained in:
2023-05-07 18:30:47 -05:00
parent d33828efa1
commit c2c2927907
3 changed files with 11 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
VERS='1.091222'
VERS='1.84-05072023'
noupdate=' stop start _service '
@@ -31,7 +31,7 @@ MAINHOSTS=10.10.2.10,10.10.2.11,10.10.2.12
SYSHOSTS=10.10.2.17
IFS=,
ESXIHOSTS=(${ESXIHOSTS})
ESXIHOSTS=(${MAINHOSTS},${SYSHOSTS})
MAINHOSTS=(${MAINHOSTS})
SYSHOSTS=(${SYSHOSTS})
unset IFS

View File

@@ -4,6 +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*'} | Shutdown-VMGuest -Confirm:$false
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

View File

@@ -293,6 +293,13 @@ SHUTDOWN_SERVER(){
echo "Ok"
}
ISCSIVMSHUTDOWN(){
for ESXIHOST in "${ESXIHOSTS[@]}"; do
echo ${ESXIHOST}
done
#/opt/idssys/powerwall/esxi-scripts/iscsi-vm-shutdown.ps1
}
TEST(){
echo "Getting info from ${1}"
/opt/idssys/powerwall/esxi-scripts/sys-iscsi-shutdown.ps1 ${1}
@@ -310,6 +317,7 @@ if [ ${action-x} ]; then
checktemp) CHECKTEMP ${2};;
checkpower) CHECKPOWER;;
test) TEST ${2};;
iscsi-vm-shutdown) ISCSIVMSHUTDOWN;;
shutdownhost) SHUTDOWN_SERVER ${2};;