Thursday, February 9, 2012

Windows Network Bridging in Hyper-V Guests

Anyone who's tried to create a Windows network bridge inside a Hyper-V guest will know that it just won't work with Hyper-V virtual NICs.

If your bridge contains one or more virtual NICs ("Microsoft Virtual Machine Bus Network Adapter"), then your bridge will send packets but never receive any. The reason for this is because the Hyper-V virtual NIC doesn't automatically enter promiscuous mode when a network bridge is created.

Luckily, the fix is simple:
In an elevated command prompt, execute the following:
netsh bridge show adapter
For each Hyper-V virtual NIC, execute the following, replacing {number} with the number of the NIC:
netsh bridge set adapter {number} forcecompatmode=enable

Your network bridge should now be working.
Reference:
http://support.microsoft.com/kb/302348