|
We're performing an emergency shutdown of a site for a generator install. I've written a script to pull all of the hosts out of maintenance mode, then power on the controller VM (Nutanix) Connect-VIServer 10.102.11.106 -User USER -Password PASSWORD Set-VMHost -VMHost 10.102.11.106 -State "Connected" Sleep 5 Get-VM NTNX* | Start-VM I have 48 hosts, and I'm getting confused on the shell order. If I write this... Connect-VIServer 10.102.11.106 -User USER -Password PASSWORD Set-VMHost -VMHost 10.102.11.106 -State "Connected" Connect-VIServer 10.102.11.107 -User USER -Password PASSWORD Set-VMHost -VMHost 10.102.11.107 -State "Connected" Sleep 5 Get-VM NTNX* | Start-VM It removes all the hosts from maint, and then starts the controllers. but if I word it like such... Connect-VIServer 10.102.11.106 -User USER -Password PASSWORD Set-VMHost -VMHost 10.102.11.106 -State "Connected" Get-VM NTNX* | Start-VM Connect-VIServer 10.102.11.107 -User USER -Password PASSWORD Set-VMHost -VMHost 10.102.11.107 -State "Connected" Get-VM NTNX* | Start-VM It removes both hosts from maint first, then starts the vms. Same as my first script. Is there any difference? I'd like a little more control over when i power the controller after it comes out of maintenance
|
# ? Jul 4, 2014 19:41 |
|
|
# ? Apr 19, 2024 15:05 |