You can set the NIC teaming policy on a vSwitch. The NIC teaming policy determines the load balancing and failover settings of a virtual switch and lets you mark NICs as unused.
Prerequisites
Verify that you are connected
to a
vCenter
Server
system.
Procedure
- Get a list of the physical NIC objects on the host network and store them in a variable.
$pn = Get-VMHost 10.23.123.128 | Get-VMHostNetwork | Select -Property physicalnic
- Store the physical NIC objects you want to mark as unused in separate variables.
$pn5 = $pn.PhysicalNic[2]
$pn6 = $pn.PhysicalNic[3]
$pn7 = $pn.PhysicalNic[0]
- View the NIC teaming policy of the VSwitch01 virtual switch.
$policy = Get-VirtualSwitch -VMHost 10.23.123.128 -Name VSwitch01 | Get-NicTeamingPolicy
- Change the policy of the switch to indicate that the $pn5, $pn6, and $pn7 network adapters are unused.
$policy | Set-NicTeamingPolicy -MakeNicUnused $pn5, $pn6, $pn7
- Modify the load balancing and failover settings of the virtual switch NIC teaming policy.
$policy | Set-NicTeamingPolicy -BeaconInterval 3 -LoadBalancingPolicy 3 -NetworkFailoverDetectionPolicy 1 -NotifySwitches $false -FailbackEnabled $false