Guide

Add team and storage network cards

A Hyper-V host that uses shared storage needs four network cards: two that work as a team for management, cluster and VM traffic, and two for storage. Each pair gives you a spare if one card or cable fails.

15 minutesOn the Hyper-V host, then inside the VM
What improves

The server has a spare card for every kind of traffic.

Why it matters

One failed card or cable should not take a Hyper-V host off the network or away from its storage.

How you do it

Add two team cards and two storage cards, name them inside Windows, then set the storage addresses.

The cards in this guide

CardCarriesAddressJob
SET-1VLANs 30, 50, 70None. Set on the team laterTeam member
SET-2VLANs 30, 50, 70None. Set on the team laterTeam member
iSCSI-AVLAN 6110.0.61.11/24First storage path
iSCSI-BVLAN 6210.0.62.11/24Second storage path
Why storage is not in the team

Storage gets its spare path from Multipath I/O, which is built for it. Microsoft and storage vendors advise keeping iSCSI cards out of a network team.

On a physical server these are four real network ports. The two team ports plug into switch ports set as trunks, and the two storage ports into ports on each storage VLAN. On a VM, you add four virtual cards as below.

Add the cards on the host

-DeviceNaming On passes each card's name into Windows, which saves matching hardware addresses later.

Hyper-V host
$vm = 'CON-HV-01'

# Remove the card the VM was created with
Get-VMNetworkAdapter -VMName $vm | Remove-VMNetworkAdapter

# Two team cards: trunks for management, VM and cluster VLANs
foreach ($n in 'SET-1','SET-2') {
    Add-VMNetworkAdapter -VMName $vm -SwitchName 'CON-LAN' -Name $n -DeviceNaming On
    Set-VMNetworkAdapterVlan -VMName $vm -VMNetworkAdapterName $n -Trunk -AllowedVlanIdList '30,50,70' -NativeVlanId 0
    Set-VMNetworkAdapter -VMName $vm -Name $n -MacAddressSpoofing On -AllowTeaming On
}

# Two storage cards
foreach ($c in @{N='iSCSI-A';V=61}, @{N='iSCSI-B';V=62}) {
    Add-VMNetworkAdapter -VMName $vm -SwitchName 'CON-LAN' -Name $c.N -DeviceNaming On
    Set-VMNetworkAdapterVlan -VMName $vm -VMNetworkAdapterName $c.N -Access -VlanId $c.V
}
SettingWhy the team cards need it
TrunkThe team carries several VLANs, so the cards must pass tagged traffic.
MacAddressSpoofing OnThe team and the VMs behind it use their own hardware addresses. Hyper-V drops that traffic unless this is on.
AllowTeaming OnLets Windows inside the VM join the two cards into a team.

Check the cards on the host

Hyper-V host
Get-VMNetworkAdapterVlan -VMName $vm | Format-Table @{n='Card';e={$_.ParentAdapter.Name}}, OperationMode, AccessVlanId, AllowedVlanIdList -AutoSize

SET-1 and SET-2 should show Trunk with 30, 50 and 70. The storage cards should show Access on 61 and 62.

Name the cards inside Windows

Start the VM, sign in as the local Administrator and open PowerShell as administrator.

CON-HV-01
Get-NetAdapterAdvancedProperty -DisplayName 'Hyper-V Network Adapter Name' |
    Where-Object { $_.Name -ne $_.DisplayValue } |
    ForEach-Object { Rename-NetAdapter -Name $_.Name -NewName $_.DisplayValue }
Get-NetAdapter | Sort-Object Name | Format-Table Name, InterfaceDescription, Status -AutoSize

All four cards should be listed by name, with status Up.

Set the storage addresses

CON-HV-01
New-NetIPAddress -InterfaceAlias 'iSCSI-A' -IPAddress 10.0.61.11 -PrefixLength 24 | Out-Null
New-NetIPAddress -InterfaceAlias 'iSCSI-B' -IPAddress 10.0.62.11 -PrefixLength 24 | Out-Null
'iSCSI-A','iSCSI-B' | ForEach-Object { Set-DnsClient -InterfaceAlias $_ -RegisterThisConnectionsAddress $false }

Storage cards have no gateway and stay out of DNS. Nothing routes into or out of the storage networks.

Check the storage paths

CON-HV-01
(Test-NetConnection 10.0.61.10 -Port 3260 -WarningAction SilentlyContinue).TcpTestSucceeded
(Test-NetConnection 10.0.62.10 -Port 3260 -WarningAction SilentlyContinue).TcpTestSucceeded

Both should say True. These reach the storage box on each path.

Things to know

  • The server has no management address yet. That comes from the team, in Team network cards with SET, after the Hyper-V role is installed.
  • 169.254 addresses beside your own are left over from before you set the address. They go after a restart.

Done when

Check

Four cards are named in Windows as they are in Hyper-V, the storage cards have their addresses, and both storage tests say True.

Your progress is kept in this browser only.