Hi everybody,
today a short day to day helper regarding cluster networks.
Last weekend I had a question from my coworker, if it is possible to react on failed networkconnections within a cluster even if the cluster is still running.
As you know Hyper-V is running as long as the cluster heartbeat is available and the storage is reachable. Only if these connections fail, Hyper-V Cluster forces a node to failover his roles.
My answer, yes it is possible with some tricks. First thing you need to know is, that if a network connection in the cluster failes, we get an error event.
Event ID 1129 — Cluster Network Connectivity Partitioned https://technet.microsoft.com/en-us/library/dd353962%28v=ws.10%29.aspx?f=255&MSPPError=-214721739
This event is also noticed in the event viewer of your Hyper-V Host. Now you can attach a task to that event and for example run a script which forces a failover.
The script to set the node in maintenance mode and force a failover could look like:
12 $VMHost = Get-SCVMHost -ID "Hyper-V Host ID"Disable-SCVMHost -VMHost $VMHost -MoveWithinCluster -RunAsynchronously
You can achieve the same effect when you use System Center Operations Manager by configuring an Agent Task for your Hyper-V Host.
Find more info here: https://technet.microsoft.com/en-us/library/hh563486.aspx