Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

VLAN · Hyper-V

Direct answer

Hyper-V can enforce VLAN behavior at the virtual port, while the external physical uplink and upstream switch must agree on tagging/native/trunk expectations. A configured VLAN ID is not packet-path proof.

When to use this

Use this topic when a VM is connected to the correct vSwitch but cannot reach peers or upstream networks due to suspected VLAN mismatch.

First 30 seconds

1. Hyper-V tags VLANs per vNIC (access, trunk, isolated, PVLAN).

2. Physical switch port must trunk the VLANs.

3. Untagged = VLAN 0 (native on the switch).

4. Host vNICs need VLANs too in converged setups.

5. Check VLAN after VM moves.

Operational verification

vNIC VLAN setting → vSwitch tags → trunk → physical switch

Evidence · next step

Verify packet tagging/forwarding at the next physical-network boundary.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

It does not show upstream switch configuration or return-path correctness.

Next check: Verify packet tagging/forwarding at the next physical-network boundary.

Platform / version applicability
hyper-v
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformhyper-v
Scope / prerequisiteUse this topic when a VM is connected to the correct vSwitch but cannot reach peers or upstream networks due to suspect…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

Guest frame/tag behavior → VM vNIC port VLAN policy → Hyper-V vSwitch → physical uplink → upstream VLAN forwarding → return path

Step 2 Effective-state and workload closure Verify boundary

Correlate guest counters/routes with virtual-port and uplink counters for the same test, validate VLAN/policy on the exact path, then repeat the original guest transaction.

Local intent: Hyper-V VLAN configuration applies 802.1Q segmentation policy to virtual switch ports so VM or management-OS traffic is associated with the intended VLAN context.

Step 3 Branching troubleshooting Narrow the fault

Concrete boundaries: guest socket/route → virtual NIC → host/hypervisor queue → bridge/vSwitch/port group → VLAN/security policy → physical uplink → external network → return → guest workload.

Path: Virtualization → Hyper-V → VLAN. Local intent: Hyper-V VLAN configuration applies 802.1Q segmentation policy to virtual switch ports so VM or management-OS traffic is associated with the intended VLAN context.

Step 4 Where it fails Narrow the fault

Common failure classes are stale inventory, asynchronous task overlap, lock conflict, capacity pressure, guest-agent lag, inaccessible dependency, placement mismatch or management/runtime divergence. Also consider stale management inventory, asynchronous task overlap, host capability mismatch, guest-agent/driver lag, CPU feature masking, NUMA pressure, backing-store latency, bridge/VLAN mismatch, MTU mismatch, snapshot chains, lock ownership and partial cluster membership.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • VLAN configured ≠ tag observed on wire.
  • Guest VLAN tagging and Hyper-V port VLAN policy must not conflict accidentally.
  • Upstream switchport configuration remains an external dependency.
  • Same VLAN number on two disconnected networks does not create connectivity.
Key checks
  • Get-VMNetworkAdapterVlan -VMName * — VLAN per vNIC
  • Set-VMNetworkAdapterVlan -VMName <vm> -Access -VlanId 20 — access VLAN
  • Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName Mgmt -Access -VlanId 10 — host vNIC VLAN
ReferenceWhat it is1 section · depth on demand

In depth

In Hyper-V, VLAN tagging is set per virtual network adapter. The Hyper-V switch tags frames from the VM with the configured VLAN ID and strips tags towards it, so the guest sees untagged traffic. The physical switch port connected to the Hyper-V host must be a trunk carrying those VLANs.

Set-VMNetworkAdapterVlan -VMName app01 -Access -VlanId 120
Set-VMNetworkAdapterVlan -VMName fw01 -Trunk -AllowedVlanIdList '100-199' -NativeVlanId 0
Get-VMNetworkAdapterVlan -VMName app01
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName Management -Access -VlanId 10
ModeUse
AccessNormal VMs in one VLAN
TrunkVMs that handle tags themselves (firewalls, routers)
UntaggedUses the native VLAN of the physical port
Isolated/Community (PVLAN)Private VLAN isolation

With Switch Embedded Teaming (SET), all team members must carry the same VLANs on the physical switches.

ReferenceWhy it matters1 section · depth on demand

Internals and state

A guest packet leaves the guest IP stack through a virtual NIC, is processed by hypervisor/host tap or synthetic device queues, traverses a bridge/vSwitch/port-group and VLAN/security policy, then reaches a physical uplink and external network.

Management-plane “connected” state does not show VLAN admission, host forwarding, offload behavior or return traffic.

Local intent: Hyper-V VLAN configuration applies 802.1Q segmentation policy to virtual switch ports so VM or management-OS traffic is associated with the intended VLAN context.

ReferenceHow it works1 section · depth on demand

How it works

How it works: A guest packet leaves the guest IP stack through a virtual NIC, is processed by hypervisor/host tap or synthetic device queues, traverses a bridge/vSwitch/port-group and VLAN/security policy, then reaches a physical uplink and external network. Management-plane “connected” state does not show VLAN admission, host forwarding, offload behavior or return traffic.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

Correct Hyper-V VLAN configuration shows intended virtual-port policy, not upstream VLAN membership or end-to-end reachability.

A guest packet leaves the guest IP stack through a virtual NIC, is processed by hypervisor/host tap or synthetic device queues, traverses a bridge/vSwitch/port-group and VLAN/security policy, then reaches a physical uplink and external network. Management-plane “connected” state does not show VLAN admission, host forwarding, offload behavior or return traffic. Close with Correlate guest counters/routes with virtual-port and uplink counters for the same test, validate VLAN/policy on the exact path, then repeat the original guest transaction. and state what the evidence does not show.

Mechanics

Follow the path in order: management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back. It can coexist with stale placement, missing guest drivers, wrong VLAN/bridge mapping, inaccessible backing storage, CPU incompatibility or a workload that cannot use the resource.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor dochyper-v current

Authoritative/upstream documentation reviewed for bounded claims in Hyper-V → VLAN. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
hyper-v vlanvm vlan hyper-vhyper-v switch vlan
Embedded reference data

Quick lookup tables

Hyper-V → VLAN reference map

Fast Hyper-V boundaries for Hyper-V → VLAN.

BoundaryMeaningEvidence limit
GuestTagged or untagged frame sourceMust match design
VM portHyper-V VLAN policyConfigured ≠ forwarded
UplinkExternal vSwitch/physical NICStill depends on upstream
UpstreamSwitchport VLAN policyOutside Hyper-V
Confirmation

Confirm action

Continue?