Mass disabling vMotion

For our new memento post, during a fully messed-up mastered maintenance operation from our beloved network team, we had access problems on our platform within and between VLANs which had the effect that some ESXi servers could not communicate with each other randomly …

In order to avoid all vMotion tasks going wild, it could be useful sometime to just postpone the automated scheduling provided by DRS.

As usual, a little PowerCLI OneLiner will be handy :

$modifiedClusters = Get-Cluster | ?{ $_.DrsAutomationLevel -eq "FullyAutomated" } | Set-Cluster -DrsAutomationLevel PartiallyAutomated -Confirm:$false

And if you want to put back the parameter to FulyAutomated :

$modifiedClusters | Set-Cluster -DrsAutomationLevel FullyAutomated -Confirm:$false

If you have some specific cluster configurations (other than FullyAutomated), you can use the Cluster Profile script from our frenchy zozor (available on : [PSH] Cluster Profiles) in order to put all configuration back (of course, after your network team have followed the Network for Dummies : 101 workshop)