FYI this is 2025 windows core, thanks
Hyper-V setting up a virtual switch
I am building a 2025 core install of hyper-v and I am at the point to create the vswitch. I am familiar with vCenter not hyper-v. Do we need to create a vswitch for each VLAN or is there something I create after I add all the vlans to the vswitch?
thanks
Windows for business | Windows Server | Networking | Software-defined networking
5 answers
Sort by: Most helpful
-
Dupler,Michael 0 Reputation points
2026-03-11T19:14:42.6866667+00:00 I need some help. I have created the PROD vswitch but I am unable to make the vnic to go with it
PS C:\Users\michael.dupler> Get-NetAdapterName InterfaceDescription ifIndex Status MacAddress LinkSpeed
SAN-A Cisco VIC Ethernet Interface #3 14 Up 00-25-B5-A2-00-29 20 Gbps
PROD-B Cisco VIC Ethernet Interface #6 13 Up 00-25-B5-B2-00-1B 20 Gbps
SAN-B Cisco VIC Ethernet Interface #4 12 Up 00-25-B5-B1-00-0D 20 Gbps
PROD-A Cisco VIC Ethernet Interface #2 11 Up 00-25-B5-A2-00-28 20 Gbps
vEthernet (vSwitch-MGT) Hyper-V Virtual Ethernet Adapter 10 Up 00-25-B5-A2-00-27 20 Gbps
MGT-B Cisco VIC Ethernet Interface #5 5 Up 00-25-B5-B2-00-1A 20 Gbps
MGT-A Cisco VIC Ethernet Interface 4 Up 00-25-B5-A2-00-27 20 Gbps
vEthernet (MGT-vNIC) Hyper-V Virtual Ethernet Adapter #2 2 Up 00-15-5D-6B-27-00 20 Gbps
PS C:\Users\michael.dupler> Get-VMSwitch
Name SwitchType NetAdapterInterfaceDescription
vSwitch-MGT External Teamed-Interface
PROD External Teamed-Interface
I then run this command
Add-VMNetworkAdapter -PROD `-Name "Prod-vNIC" `
-SwitchName "vSwitch-PROD"
I get this response
Add-VMNetworkAdapter -PROD `-Name "Prod-vNIC" `
-SwitchName "vSwitch-PROD"
Add-VMNetworkAdapter : A parameter cannot be found that matches parameter name 'PROD'.
At line:1 char:22
- Add-VMNetworkAdapter -PROD `
-
~~~~~- CategoryInfo : InvalidArgument: (:) [Add-VMNetworkAdapter], ParameterBindingException
- FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.HyperV.PowerShell.Commands.AddVMNetworkAdapter
any thoughts? thanks
-
Domic Vo 21,150 Reputation points Independent Advisor
2026-03-08T08:10:55.97+00:00 Good morning,
I hope you are doing well.
Have you found the answer useful? If everything is okay, don't forget to share your experience with the issue by accepting the answer. Should you need more information, free free to leave a message. Happy to help! :)
Domic Vo.
-
Domic Vo 21,150 Reputation points Independent Advisor
2026-03-04T20:52:19.9733333+00:00 Hello Dupler,Michael,
In Hyper‑V, you do not create a separate virtual switch for each VLAN. Instead, you typically create one external vSwitch bound to the physical NIC, and then configure VLAN tagging at the VM level or on the vNICs. Hyper‑V supports IEEE 802.1Q VLAN tagging, so you can assign a VLAN ID to each VM’s virtual network adapter. The vSwitch itself passes tagged traffic through to the physical NIC, which must be connected to a trunk port on your physical switch. This design is different from vCenter, where port groups are often used to represent VLANs. In Hyper‑V, the vSwitch is the trunk, and VLANs are defined per vNIC.
If you need multiple VLANs, you don’t create multiple vSwitches. You create one external vSwitch and then configure each VM’s adapter with the appropriate VLAN ID under the VM settings (Network Adapter > Advanced Features > VLAN ID). The only time you would create multiple vSwitches is if you are separating traffic across different physical NICs or isolating networks entirely.
So the correct approach is: create a single external vSwitch, ensure the physical NIC is connected to a trunk port that carries all required VLANs, and then assign VLAN IDs to the VM adapters as needed. That way, you can support multiple VLANs without proliferating vSwitches.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.
-
Q&A Assist2026-03-04T20:19:45.5666667+00:00 AI generated content. This question contains an answer created with AI from Q&A Assist. Learn moreHyper-V does not require a separate virtual switch per VLAN.
Typical design:
- Create one external virtual switch per physical uplink/teamed uplink
- This is the software equivalent of a vSphere vSwitch or vDS uplinked to a trunk port.
- Create it once in Hyper-V Manager or with PowerShell:
New-VMSwitch -Name <switch-name> -NetAdapterName <netadapter-name> - Use VLAN tagging on that switch/its adapters
There are two layers where VLAN IDs are configured: a. Management OS (host) on that vSwitch- If the host itself must live on a specific VLAN, enable VLAN ID for the management OS on that switch:
- Hyper-V Manager: Virtual Switch Manager → select switch → check Enable virtual LAN identification for management operating system and set the VLAN ID.
- Or PowerShell:
b. Each VM’s virtual NICSet-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName <vmswitch name> -Access -VlanId <id>- For isolation per VM, assign a VLAN ID on the VM’s network adapter (access mode) so that different VMs on the same vSwitch can be on different VLANs.
- The physical switch port that the Hyper-V host connects to must be configured as an 802.1Q trunk carrying all required VLANs.
- Optional: Trunk mode from host to network
If multiple VLANs must be carried over the host uplink and you want to configure trunking options (native VLAN, allowed VLAN list) for the management OS adapter, use PowerShell:$parameters = @{ ManagementOS = $true VMNetworkAdapterName = <vmswitch name> Trunk = $true NativeVlanId = <id> AllowedVlanIdList = <allowed ids> # e.g. 200-210 } Set-VMNetworkAdapterVlan @parameters
Key point:
One external vSwitch can carry many VLANs; VLAN separation is done by tagging on the VM NICs (and optionally the management OS), not by creating a separate vSwitch per VLAN.Ensure that:
- The physical NIC and driver support 802.1Q VLAN tagging.
- The physical switch port is configured to allow the VLAN IDs used by the Hyper-V vSwitch and VMs.
References:
- Create one external virtual switch per physical uplink/teamed uplink