Tripp Lite SV20KM1P1B Users Guide for PowerAlert Network Shutdown Agent PANSA - Page 19

vmxcmd = `vicfg-hostops.pl --server $host $loginHostops -operation enter --force

Page 19 highlights

APPENDIX A - Sample Scripts #stop vm `"$vmwareCMD" -H $host $loginCMD \"$vmxlist\" stop hard User input optional- change the wait period if appropriate. # Value is in seconds # insert wait period to complete vm shutdown sleep 120; #Place the host(s) in Maintenance mode foreach my $host (@hosts) { say $host; $vmxcmd = `vicfg-hostops.pl --server $host $loginHostops -operation enter --force'; #say $vmxcmd; } # User input optional- change the wait period if appropriate. # Value is in seconds # insert wait period to complete maintenance mode sleep 30; #Shutdown the host(s) foreach my $host (@hosts) { say $host; $vmxcmd = `vicfg-hostops.pl --server $host $loginHostops -operation shutdown --force'; #say $vmxcmd; } exit 19

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

19
APPENDIX A – Sample Scripts
#stop vm
`"$vmwareCMD" -H $host $loginCMD \"$vmxlist\" stop hard`;
}
}
}
}
# User input optional- change the wait period if appropriate.
# Value is in seconds
# insert wait period to complete vm shutdown
sleep 120;
#Place the host(s) in Maintenance mode
foreach my $host (@hosts) {
say $host;
$vmxcmd = `vicfg-hostops.pl --server $host $loginHostops -operation enter --force';
#say $vmxcmd;
}
# User input optional- change the wait period if appropriate.
# Value is in seconds
# insert wait period to complete maintenance mode
sleep 30;
#Shutdown the host(s)
foreach my $host (@hosts) {
say $host;
$vmxcmd = `vicfg-hostops.pl --server $host $loginHostops -operation shutdown --force';
#say $vmxcmd;
}
exit