My Nested Hyper‑V VM cannot reach external networks. How can I enable MAC address spoofing ?

Mendoza Joshua 20 Reputation points
2026-08-14T02:25:54.34+00:00

A virtual machine running inside an L1 Hyper‑V host (nested virtualization) cannot establish network connectivity to external subnets. Upstream Hyper‑V hosts are dropping Layer‑2 packets because MAC address spoofing prevention rules are active on the parent virtual switch. The issue persists even though the inner VM’s network configuration appears correct. Physical host connectivity and switch health are normal, confirming the problem lies in the spoofing restriction. How can I enable MacAddressSpoofing on the host’s virtual switch ports to restore external network access ?

Windows for business | Windows 365 Business
0 comments No comments

2 answers

Sort by: Most helpful
  1. Marcin Policht 109.9K Reputation points MVP Volunteer Moderator
    2026-08-14T03:16:24.1033333+00:00

    On the L1 Hyper-V host, enable MAC address spoofing on the network adapter of the nested VM. Run PowerShell as Administrator:

    Set-VMNetworkAdapter -VMName "NestedVMName" -MacAddressSpoofing On
    

    If the nested VM is connected through a specific virtual switch, you can first identify its adapter with:

    Get-VMNetworkAdapter -VMName "NestedVMName"
    

    Then enable spoofing on that adapter:

    Set-VMNetworkAdapter -VMName "NestedVMName" -MacAddressSpoofing On
    

    If you have multiple nested VMs, apply it to each VM that needs to pass traffic using MAC addresses other than its assigned virtual NIC MAC. You can verify the setting with:

    Get-VMNetworkAdapter -VMName "NestedVMName" | Select-Object VMName,Name,MacAddressSpoofing
    

    The result should show MacAddressSpoofing : On. This setting is applied to the L1 host's Hyper-V virtual NIC/port, not to the physical switch itself. You do not need to modify the physical network switch when the problem is Hyper-V's MAC spoofing protection.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-08-14T02:26:08.2933333+00:00

    Enable MAC address spoofing on the L1 VM’s network adapter, not on the physical switch.

    1. Make sure the L1 virtual machine is the one hosting the nested Hyper-V VMs.
    2. On the parent Hyper-V host, run:
    Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On
    

    Replace <VMName> with the name of the L1 VM.

    This allows packets from nested VMs to pass through two virtual switches. MAC address spoofing must be enabled at the first level of the virtual switch for traffic to be routed correctly.

    If MAC address spoofing cannot be used, use NAT networking instead. That approach is recommended in environments where spoofing is not possible, such as some public cloud environments.

    For nested virtualization generally, also verify:

    • The guest VM is Generation 2.
    • Nested virtualization is enabled:
    Set-VMProcessor -VMName "<VMName>" -ExposeVirtualizationExtensions $true
    
    • The VM is powered off before changing nested virtualization settings.
    • The nested host has at least 2 virtual CPUs and at least 4 GB RAM.
    • If external connectivity still fails, confirm Windows Firewall is not blocking traffic and restart the VMs after network configuration changes.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.