Today let’s focus on logic behind Possible Owners feature in Failover clustering.
This is a little trickier. Before a VM can have its 'Possible Owner'
property set, it must be on one of the Hyper-V nodes first. There can be a few scenarios - VM1 and 4 Hyper-V Nodes: Node1-4.
begin{}
block I will:$PossibleOwner
not set, I’ll assign all current cluster nodes to it$PossibleOwner
is set I will validate whether provided nodes exists
Then I’ll loop through each VM. If it’s found then:Compare to expected and if there’s a mismatch I’ll proceed
Here’s the full script:
And here’s the output from PowerShell Core:
This one requires a little bit of more work than before. Mainly because involves moving VMs between nodes. One last to go and we’ll get into reporting :)