If you get the following error when you want to make a VLAN change on your virtual server that you use on Hyperv;
"Error applying Network Adapter changes"
"The operation failed. Failed while applying switch port settings 'Ethernet Switch Port VLAN Settings' on switch 'Vs': One or more arguments are invalid (0x80070057)."
The root cause of this problem is the network mode you use on your virtual server, for example F5 virtual server appliance.
Let’s continue with the example there are more than one ethernet card over the F5 virtual server appliance, some of which are trunk and some are access mode.
You will get an error when you make the VLAN change on the Trunk mode card from the Hyper V Failover Cluster gui.
To fix this problem, you can follow the steps below;
- First of all, we view the cards and their modes on the virtual server.
Get-VMNetworkAdapterVlan -VMName servername
- The tag is removed the network card with trunk mode.
Set-VMNetworkAdapterVlan -VMName servername -VMNetworkAdapterName NIC3 -untagged
- We define access mode and VLAN ID.
Set-VMNetworkAdapterVlan -VMName servername -VMNetworkAdapterName NIC3 -Access -VlanId 715
- To view the change made.
Get-VMNetworkAdapterVlan -VMName servername
Have a nice day!