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 ' 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 SYSHOSTS=10.10.2.17
IFS=, IFS=,
ESXIHOSTS=(${ESXIHOSTS}) ESXIHOSTS=(${MAINHOSTS},${SYSHOSTS})
MAINHOSTS=(${MAINHOSTS}) MAINHOSTS=(${MAINHOSTS})
SYSHOSTS=(${SYSHOSTS}) SYSHOSTS=(${SYSHOSTS})
unset IFS unset IFS

View File

@@ -4,6 +4,4 @@
Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword 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*'} | Shutdown-VMGuest -Confirm:$false
Get-Datastore | Where {$_.Name -like '*iSCSI1*' -or $_.Name -like '*iSCSI2*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'}

View File

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