Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Acc-Risk
Sep 28, 2001


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

Adbot
ADBOT LOVES YOU

  • Locked thread