Using a Wireless connection in Hyper-V

If you’ve ever installed Microsoft Hyper-V on a server that has a wireless network card and has the Wireless LAN feature enabled, you have probably noticed Hyper-V does not support connecting virtual machines to wireless network adapters (it only lists the existing wired physical adapters when offered the option to create the Virtual Adapters). There’s a great article on Ben Armstrong’s blog describing just how to work around this…

The technical reason for this is really simple: in order to perform the virtual networking required by Hyper-V, Microsoft implemented an OSI layer 2 filter driver that creates network packets with the MAC address of the appropriate virtual machine. Unfortunately the wireless networking standard explicitly forbids the creation of network packets with different MAC addresses to that of the physical computer (for obvious security purposes).

As a primarily server-focused product, this is a reasonable limitation for Hyper-V. But all is not lost, as it is actually possible to setup an internal virtual network and use Internet Connection Sharing to make this work. The first thing to do is to create a new internal virtual network switch:

  1. Open the Hyper-V Manager and select your server.
  2. Select Virtual Network Manager… from the action pane (on the right).
  3. Select New virtual network and choose to Add an Internal network.
  4. Give the new virtual network the name you want and then click OK.

Now, onwards to setting up Internet Connection Sharing:

  1. Open the Control Panel and open Network and Sharing Center.
  2. Select Manage network connections (or Change adapter settings in Windows 2008 R2) from the list on the left.
  3. Locate the icon for your wireless network adapter, right click on it and select Properties.
  4. Go to the Sharing tab.
  5. Check the Allow other network users to connect through this computer’s Internet connection option.
  6. If you have multiple network adapters, you will need to select the specific entry for the internal virtual network switch you’ve created earlier, and click OK.

You will now be able to connect virtual machines to the internal virtual network and allow them to access the Internet through your wireless network adapter.

Hope this helps! :)