3

on our Windows 2012 R2 Hyper-V Free server, which will host the VM now running on an ESXi, I messed up launching twice the

Add-VMNetworkAdapter

cmdlet. These are the steps I took:

create a team

New-NetLbfoTeam -Name TeamTrunk -TeamMembers NIC1,NIC2 -LoadBalancingAlgorithm HyperVPort -TeamingMode SwitchIndependent

create a virtual switch

New-VMSwitch -Name vSwitchTrunk -AllowManagementOS $false -NetAdapterName TeamTrunk

created the vEthernet

Add-VMNetworkAdapter -ManagementOS -Name Cloud -SwitchName
vSwitchTrunk Add-VMNetworkAdapter -ManagementOS -Name Office -SwitchName vSwitchTrunk

with the purpose to assign VLANs with

Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanId 9 -VMNetworkAdapterName Cloud
Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanId 10  -VMNetworkAdapterName Office

As mentioned, I've launched twice Add-VMNetworkAdapter. Now, querying the system with Get-NetAdapter, it shows

Name                      InterfaceDescription                    ifIndex
----                      --------------------                    -------
vEthernet (Cloud) #3  Hyper-V Virtual Ethernet Adapter #9          112
vEthernet (Cloud) #2  Hyper-V Virtual Ethernet Adapter #8          108
vEthernet (Cloud) #1  Hyper-V Virtual Ethernet Adapter #7          104
vEthernet (Cloud)     Hyper-V Virtual Ethernet Adapter #6          100
vEthernet (Office) #3 Hyper-V Virtual Ethernet Adapter #5          96
vEthernet (Office) #2 Hyper-V Virtual Ethernet Adapter #4          90
vEthernet (Office) #1 Hyper-V Virtual Ethernet Adapter #3          84
vEthernet (Office)    Hyper-V Virtual Ethernet Adapter #2          78

I've tried to remove the adapters, with the cmdlet

Remove-VMNetworkAdapter -ManagementOS -Name xyz

which removes all the adapters. If I re-execute the cmdlet Add-VMNetworkAdapter, it creates multiple vEthernet adapters.

How can I make it back to create only one vEthernet adapter?

Any idea? I can reboot the server with no problems.

Thank you in advance.

Furuvio
  • 31
  • 1
  • 2

0 Answers0