Preferred Networks and Metrics
In Hyper-V, when you enable Cluster Shared Volumes, the failover cluster automatically chooses the network that appears to be the best for CSV communication. However, you can designate the network by using the cluster network property, Metric.
The lowest Metric value designates the network for CSV and internal cluster communication.
The second lowest value designates the network for live migration, if live migration is used (you can also designate the network for live migration by using the failover cluster snap-in).
Another property, called AutoMetric, uses true and false values to track whether Metric is being controlled automatically by the cluster or has been manually defined.
When the cluster sets the Metric value automatically, it uses increments of 100.
For Private Networks, networks that do not have a default gateway setting, it sets the value to 1000 or greater.
For networks that have a default gateway setting, it sets the value to 10000 or greater.
Therefore, for your preferred CSV network, choose a value lower than 1000, and give it the lowest metric value of all your networks.
To identify the networks used by a failover cluster and the properties of each network, type the following:
- import-module failoverclusters
- Get-ClusterNetwork | ft Name, Metric, AutoMetric, Role
To change the Metric setting to 900 for the network named Cluster Network 1, type the following:
- ( Get-ClusterNetwork "Cluster Network 1" ).Metric = 900
The AutoMetric setting changes from True to False after you manually change the Metric setting. This tells you that the cluster is not automatically assigning a Metric setting. If you want the cluster to start automatically assigning the Metric setting again for the network named Cluster Network 1, type the following:
- ( Get-ClusterNetwork "Cluster Network 1" ).AutoMetric = $true
As an example, run the following:
( Get-ClusterNetwork "10G C-HB VLAN" ).Metric = 900
( Get-ClusterNetwork "10G C-HB VLAN" ).AutoMetric = $false
( Get-ClusterNetwork "10G CSV VLAN" ).Metric = 600
( Get-ClusterNetwork "10G CSV VLAN" ).AutoMetric = $false
( Get-ClusterNetwork "10G Live Mig" ).Metric = 1200
( Get-ClusterNetwork "10G Live Mig" ).AutoMetric = $false
For the Role Property:
- 1 represents a private cluster network
- 3 represents a mixed cluster network (public plus private)
As an example, for my 4 Hyper-V hosts, this is the what the Cluster Networks look like.
You can also manually change which network Virtual Machines use for Live Migration, On one of the Hyper-V hosts, open Server Manager > Expand Failover Cluster Manager > Expand the Cluster > Expand Services and applications > In the console tree (on the left), select the clustered virtual machine for which you want to configure the network for live migration > Right-click the virtual machine resource displayed in the center pane (not on the left), and then click Properties.
Click the Network for live migration tab, and select one or more cluster networks to use for live migration. Use the buttons on the right to move the cluster networks up or down to ensure that a private cluster network is the most preferred. The default preference order is as follows: networks that have no default gateway should be located first; networks that are used by cluster shared volumes and cluster traffic should be located last.
Possible cluster resource Owners
You might receive an error like this when moving cluster resources such as a Cluster Shared Volume.
Error Code: 0x80071398 The operation failed because either the specified cluster node is not the owner of the group, or the node is not a possible owner of the group.
List possible owners for cluster resources
- cluster res <name of resource> /listowners
Add possible owners to cluster resources
- cluster res <name of resource> /addowner:<missing node>
Can i change this metric after i create the cluster? Or can it be done before
I’m reading through http://technet.microsoft.com/en-us/library/cc732181(WS.10).aspx#BKMK_Connect
I have got as far as installing the role & vaildating the cluster but not creating it.
When i type Get-ClusterNetwork is says the service is not started.
My failover adpter is bound to the wrong card.
Helen, I have updated this page and added some screen shots which should provide more information which should help.
Hello Marc, thanks for a great blog post! Some very useful infomration here! Can I just ask… does the cluster just the network with the lowest metric for its ‘Heart Beat’? In other words which connection will it use to decide if a host is down or not?
Thanks for your help!
Thanks for the post
You said, the second lowest value designates the network for live migration
So why then you configured ( Get-ClusterNetwork “10G Live Mig” ).Metric = 1200 shouldn’t it be >600 and <900 ?
and I thought AutoMetric will change to $false automaticly when you modify Metric value