Windows Server 2012 Hyper-V Cluster With NIC Teaming #WS2012 #vswitch   16 comments

In my previous post “ “ I showed how to create a Windows server 2012 nic team. But what can you do with it ?

suppose you have multiple servers running windows server 2012 and they all have 4 10gb Nic’s this is a nice playground.

In my demo I have only 2 1gb nic’s but the samples are the same for any server.

Sample copy with nic teaming



What do we need to setup a Windows server 2012 with a hyper-v cluster ( I used the GUI version ) datacenter edition.

We can do the installation with a GUI or by PowerShell. I do a Mix GUI/posh

first we need to have the hyper-v and the Failover cluster feature installed

If you don’t know how to start

go to PowerShell ISE if you want.

or just the plain PowerShell


This will show you a list of all the components you can install or have been installed

clip_image002[6] clip_image004[4] clip_image006[4]

I do not know the name of the feature so I looked it up.

Install-WindowsFeature -Name Failover-Clustering

Install-WindowsFeature –Name Hyper-V -IncludeManagementTools –Restart

I have already done this so no reboot is needed.

Well the TEAM you could do this by GUI or with Posh


One fine tip If you use PowerShell keep your nic names simple no “ local area connection “ 1,2,3,4 etc.  in the GUI you can click but is PowerShell you have to type and I know we are lazy.

Create the Team in PowerShell

New-NetLbfoTeam Team1 NIC1SW1,NIC2SW2 -TeamingMode SwitchIndependent -LoadBalancingAlgorithm HyperVPort -a


the –a is Accept else you get a yes or no .

clip_image012[4]  clip_image014[4]

Now that the team is there We can create a virtual switch that can hold our network adapters

New-VMSwitch “VirtualSwitch” -MinimumBandwidthMode Weight -NetAdapterName “Team01” -AllowManagementOS 0

-AllowManagementOS 0 means no lan connection

Edit 18-12-2013 So If you do want a network connection use 1


Now We create a virtual nic that connect us to the LAN or management

Add-VMNetworkAdapter -ManagementOS -Name “LAN” -SwitchName “VirtualSwitch”


As You can see the Vnic is added to the adapter list

clip_image020[4] clip_image022[4]

As we compare both adapters you can see that the Team holds only the Virtual switch protocol and the LAN hold an IP Winking smile

But what about QoS yes you will see a lot of different points on the web and all different yes you can set this.

Here is a nice link Microsoft also published some best practices for QoS.

Keep in mind that the Weight off all your nic’s should be 100

Don’t do DCB and Minimum Bandwidth rules on the same NICs, You can set this on every VM if you like or on the adapter. But ask your self do you need this  ?

Live migration network needs the most power.

This is how you set this :  these are just samples test before you set this is IMHO

Set-VMSwitch “VirtualSwitch -DefaultFlowMinimumBandwidthWeight 50

Set-VMNetworkAdapter -ManagementOS -Name “LiveMigration” -MinimumBandwidthWeight 20

Set-VMNetworkAdapter -ManagementOS -Name “CSV” -MinimumBandwidthWeight 50

Set-VMNetworkAdapter -ManagementOS -Name “Management” -MinimumBandwidthWeight 30

I do not set this It is up to you


To create more Adapters it goes like this :

Add-VMNetworkAdapter -ManagementOS -Name “Management” -SwitchName “VirtualSwitch”

Add-VMNetworkAdapter -ManagementOS -Name “LiveMigration” -SwitchName “VirtualSwitch”

Add-VMNetworkAdapter -ManagementOS -Name “CSV” -SwitchName “VirtualSwitch”

And if you want to use a VLAN on these adapter yes you can :


Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName “Management” -Access -VlanId 111

Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName “LiveMigration” -Access -VlanId 15

Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName “CSV” -Access -VlanId 11


The default value for the -ManagementOS is True. This means that these three interfaces now show up in you

GUI with the names vEthernet (Management), vEthernet (Live Migration) and vEthernet (Cluster).

To separate the traffic between the interfaces we assign each vNIC its own VLAN.


Now that we have set and created the Vswitch and the Vnic’s we can get some info about this config


Get-VMNetworkAdapter -ManagementOS -Name * | ft Name, VMName, MinimumBandwidthWeight, BandwidthPercentage, IsManagementOS

Get-Help Set-VMNetworkAdapter -Full

Get-Help Set-VMNetworkAdapterVlan -Full

Get-Help New-VMSwitch -Full

Get-Help Set-VMSwitch –Full

these command should give you a lot of info about these commands

or update-help get all the latest versions.




clip_image030[4] clip_image032[4]


Get-VMSwitch |fl *

Now you will get a full list of all the settings

Get-VMNetworkAdapter -ManagementOS


Set the IP adress


Yes but how to set this easy but there are multiple ways. and by gui if you like.

New-NetIPAddress -PrefixLength 8 -InterfaceIndex 68 -IPAddress image

With the above settings you can list all the adapters and find the InterfaceIndex to set the IP adress


Get-VMNetworkAdapter -ManagementOS |where name -eq “csv” |fl *

Or just list one adapter

clip_image038[4] clip_image040[4]

New-NetIPAddress -PrefixLength 8 -InterfaceIndex 68 -IPAddress can set the IP but also this

New-NetIPAddress -InterfaceAlias “vEthernet (nlb01)” -IPAddress -PrefixLength “24” -DefaultGateway

So there are multiple ways to set the IP based on InterfaceAlias or InterfaceIndex

And DNS settings  :  Set-DnsClientServerAddress -InterfaceAlias “vEthernet (nlb01)” -ServerAddresses,

and if you don’t want a gateway

New-NetIPAddress -InterfaceAlias “iSCSI01” -IPAddress -PrefixLength “24”

clip_image042[4]   clip_image044[4]  clip_image046[4]

Cluster Creation Using all the Virtual nics

Now that all the network adapters are in place and all the nics have an IP address nicely named we can create our cluster I will do this quickly I created so many post on how to create a windows server 2012 cluster.

Open the FCM I do the Validation a few warnings and yes I know.


Verifying that a node does not have multiple adapters connected to the same subnet.

Adapters vEthernet (LAN) and vEthernet (Management) on node I5NODE02.mvp.local have IP addresses on the same subnet.

Adapters vEthernet (ISCSI02) and vEthernet (ISCSI01) on node I5NODE02.mvp.local have IP addresses on the same subnet.

Adapters vEthernet (NLB02) and vEthernet (NLB01) on node I5NODE02.mvp.local have IP addresses on the same subnet.

I ignore the Warnings for now.

clip_image050[4]  clip_image052[4]

Now that my cluster is ready and I see all the NICs but they are named cluster network 1 to 5 yes you can rename this. And I advice this to do just to find the Nic easily  don’t mesh up the wrong network.


clip_image054[4]  clip_image056[4]

just go to the properties of the nic and rename it

clip_image058[4]  clip_image060[4]  clip_image062[5]

One thing left configure your live migration settings.

If you look at the VM network adapter here you can set the Bandwidth.




Posted February 5, 2013 by Robert Smit [MVP] in Windows Cluster, Windows Server 2012

Tagged with

16 responses to “Windows Server 2012 Hyper-V Cluster With NIC Teaming #WS2012 #vswitch

Subscribe to comments with RSS.

  1. Dear Robert,

    Thank you for the reply.

    I have a small request please.

    Could you please send your recent post as word document?

    The problem is that I am not able to see the screenshots, the ISP provider is blocking the images via proxy 😦

    Your help is highly appreciated.

    Thank you and regards,

  2. This is a great walkthrough – thank you!! However, after going through some of it, I realized that I don’t need one of the VMNetworkAdapter devices that I created. Remove-VMNetworkAdapter doesn’t remove it – it just disconnects it from a VM. Is there some way to delete a vEthernet device? In my GUI, the Delete option is disabled.

    • this should also delete the adapter unless you have any connections to the nic. in my lab I showed that is was deleted. but I will look in to it.
      Thanks for the comment.
      I will let you know in a few days. ( sry )

      • Robert,

        Great post! Thanks for sharing. I also am trying to remove an wanted NIC. The GUI is grayed out as well. The remove-vmnetworkadpater fails as well.

  3. Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #15 - Flo's Datacenter Report

  4. Pingback: Dell Community

  5. Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #15 - Dell TechCenter - TechCenter - Dell Community

  6. Pingback: Microsoft Most Valuable Professional (MVP) – Best Posts of the Week around Windows Server, Exchange, SystemCenter and more – #15 |

  7. Pingback: Server King » Dell’s Digest for February 11, 2013

  8. Pingback: Hyper-V King

  9. Hi Robert , Thanks for these helpful articles,
    Can you tell me in windows server 2012 hyper-v how to map a Physical NIC(pnic) to a virtual NIC(vnic) , is there any way or powershell commands to find this?

  10. in this blog post all the physical nics are teams and on top of them are vnics so this is the way to connect them.

  11. Hi – followed your article. Setup a team, added vswitch then added seperate virtual network adapters tagged for management, livemigration, storage etc using vlan tagging. All semed ok, but I found that none of those adapters could talk to real world, including my management connection.
    I recreated the vswitch, but with the -AllowManagementOS value set to 1 instead of 0 stated above. Everything started working as desired.
    So i wondered why you were isolating the switch and therefore the virtual adapters from the host OS, when in fact its the host OS that needs to use those adapters?

    • Thanks for pointing me to this, I have several environments and I do not want that all vm’s can talk to the host.
      So my environment is based on several Hyper-v clusters in a separate domain and the Running VM’s are in a different domain. The goal of the post is showing you how to create the Vswitch / networks.

      I checked the post again and there is a line -AllowManagementOS 0 means no lan connection 😉
      So if you do want LAN put this to 1

      It is now there.

      Now that the team is there We can create a virtual switch that can hold our network adapters

      New-VMSwitch “VirtualSwitch” -MinimumBandwidthMode Weight -NetAdapterName “Team01” -AllowManagementOS 0

      -AllowManagementOS 0 means no lan connection

  12. I know this is an old post, but “allowmanagementos 0” just means don’t create a vmnetadapter when the switch is created. If you’ve already created the switch, just Add-VMNetworkAdapter -ManagementOS -Name “LAN” -SwitchName “VirtualSwitch” like in the notes and you’re good to go.

  13. Hang on… I might be off on that. I’ll have to do some testing.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Twitter

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

  • RSS Azure and Microsoft Windows Server Blog

  • %d bloggers like this: