Windows 2016 S2D – Balance VMs

Windows 2016 S2D – Balance VMs


Another day – another dirty – quicky.

If you have a Windows 2016 Hyper-V cluster and a bunch of VMs you may have noticed an effect of auto balance feature. It evaluates a node’s load based on some heuristics and then moves compute resources to a better node. More details can be found here. It is enabled by default but can be easily adjusted if need be.

In my environment I need to rebalance VMs based on two factors:

  • balance VMs based on their storage resources (where their VHDs reside) – i.e. after some maintenance
  • balance VMs based on their compute resources (owner node) – i.e. After some over trigger-happy operator creating a bunch of VMs on single node and then cluster feature balancing them.

This is a fairly easy task when you know WHAT to move where. But I’m lazy so I want the lazy job made for me.

PowerShell Rocks!

(I’ve made our slack channel add ‘Rocks!’ anytime, anyone types PowerShell ) 🙂

If I need to align VMs compute to where their storage is (LiveMigrate that is) I use this:

And if I need to move storage to where compute is (Storage Migration) I prefer this snippet:


No more unnecesary IOPS


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s