Nested hyper-v guest network connectivity issue

Jiya Raha 60 Reputation points
2026-09-02T08:16:28.49+00:00

Plugged in the guest vms nested inside the inner hyper-v host and the network connection was not working to the physical network how can i enable mac address spoofing on the outer virtual network adapter to allow the nested vms to access the network ?

Windows for business | Windows 365 Business
0 comments No comments

2 answers

Sort by: Most helpful
  1. Hoang Le 3,935 Reputation points Independent Advisor
    2026-09-02T09:06:57.5166667+00:00

    Dear Jiya Raha,

    In a nested Hyper‑V setup, the inner guest VMs cannot reach the physical network unless the outer VM’s virtual NIC allows their MAC addresses to pass through. The way to achieve this is by enabling MAC address spoofing on the outer VM’s virtual network adapter. You can do this directly in PowerShell from the physical host that runs the outer VM. The command is:

    powershell

    Set-VMNetworkAdapter -VMName "<OuterVMName>" -Name "<AdapterName>" -MacAddressSpoofing On
    

    Replace <OuterVMName> with the name of the VM that hosts your inner Hyper‑V environment, and <AdapterName> with the name of the virtual NIC attached to it. Once spoofing is enabled, the inner guest VMs will be able to send and receive traffic using their own MAC addresses through the outer VM’s adapter, restoring full network connectivity.

    If my answer is useful for you, please hit Accept the answer to support me.

    Thank you,

    HL.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-09-02T08:16:46.0333333+00:00

    To allow nested VMs to reach the physical network through the outer Hyper-V VM, enable MAC address spoofing on the outer VM’s network adapter.

    1. Shut down the outer VM if needed.
    2. On the physical host, open PowerShell.
    3. Run:
    Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On
    

    Replace <VMName> with the name of the outer VM that is hosting the inner Hyper-V guests.

    Why this is needed:

    • Nested VM traffic passes through two virtual switches.
    • Hyper-V requires MAC address spoofing on the first-level VM adapter so packets from the nested guests can be routed correctly.

    If connectivity still fails after enabling spoofing, check these items:

    1. The nested VM is connected to an External virtual switch, not Internal or Private.
    2. The outer VM is using the correct external network adapter.
    3. Windows Firewall or security software is not blocking traffic.
    4. If MAC spoofing cannot be used, configure NAT instead.

    If NAT is required in the outer VM, the documented setup is:

    New-VMSwitch -Name VmNAT -SwitchType Internal
    New-NetNat –Name LocalNAT –InternalIPInterfaceAddressPrefix “192.168.100.0/24”
    Get-NetAdapter "vEthernet (VmNat)" | New-NetIPAddress -IPAddress 192.168.100.1 -AddressFamily IPv4 -PrefixLength 24
    

    Then assign each nested VM an IP in that subnet and use 192.168.100.1 as the gateway.


    References:

    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.