Hi Everyone
I am having a strange problem configuring my Hyper-V Virtual Switch and Virtual Network Adapters and I am hoping someone can lend me their expertise.
To start, I created a team of 2 physical NICs:
New-NetLBFOTeam "PhysicalTeam" –TeamMembers "Ethernet 1", "Ethernet 2" -TeamingMode SwitchIndependent -LoadBalancingAlgorithm HyperVPort
Next, I created a Hyper-V Switch:
New-VMSwitch "HVSWITCH" –NetAdapterName "PhysicalTeam" –MinimumBandwidthMode Weight –AllowManagementOS $false
At this point, the "Allow management operating system to share this network adapter" is unchecked in the Hyper-V Manager -> Virtual Switch Manager GUI.
Finally I created a new Virtual Network Adapter which I plan to give the Management OS network connectivity from:
Add-VMNetworkAdapter –ManagementOS –Name "Management" –SwitchName "HVSWITCH"
Which resulted in the "Allow management operating system to share this network adapter" becoming checked.
Set-VMNetworkAdapterVLAN -ManagementOS -VMNetworkAdapterName "Management" -Access -VLANID 300
Which resulted in The VLAN ID section of the "Virtual Switch Manager" becoming checked and being populated with "300" in the box.
Then I set a static IP on the "Management" Adapter with an address from VLAN 300.
The problem I am having is that the Management Network Adapter I have created does not see any network connectivity, cannot ping the gateway, etc..
I know that the problem does not lie in the outside network because I took the following troubleshooting steps:
I deleted the Hyper-V Switch and the Virtual Network Adapter that I previously created. I then proceeded to statically IP "PhysicalTeam" using the same address as before and setting the VLAN for the team
in the LBFO GUI to 300. After doing this, I get connectivity and can ping, etc..
To further add to my confusion, I wiped the static addresses from "Physical Team" and removed the VLAN settings from the LBFO GUI.
Then I created the Hyper-V Switch again using the same command as before.
This time instead of using PowerShell to create the "Management" Network Adapter, I went into the "Hyper-V Manager -> Virtual Switch Manager" and checked off "Allow management operating system to share this network adapter"
and in the VLAN ID section, I checked off the box and entered 300.
This created a Network Adapter with the same name as the Switch - "vEthernet (HVSWITCH)", and to my surprise this method worked to get connectivity once the static IP was set.
My question at this point is why didn't it work through powershell? Is there something different that the Virtual Switch Manager does?
I tried wiping everything a few times over. Everytime I create the "Management" adapter and set the VLAN through powershell there is no connectivity, but doing it through "Virtual Switch Manager" always
works.
I must be doing something wrong. I am trying to get this to work through powershell since I want to use a script to automate this task on multiple servers.
Thanks