Disconnecting Hyper-V

My work laptop runs Windows Server 2008 for one main reason, Hyper-V.  I have a 64 bit CPU with 4 Gb of RAM installed, so it seemed the obvious choice to install it!  Everything runs very well, especially my virtual machines which as an Infrastructure consultant I could not live without.  However, one thing has really bugged me, the lack of wireless support to link VMs directly to the wireless adapter of the host.  I barely use wired connections anymore, both my home and the Microsoft office have full wireless coverage, which always gave me problems as it meant that my VMs never had an Internet connection.  Sure, I could have used a physical cable (which is what I have been doing) but this not particularly practical, especially at home where I have my wireless router stashed under the sofa!

I had previously unsuccessfully tried this article by the Virtual PC Guy to get the wireless working, albeit in an unsupported configuration.  I didn't like this solution for 2 reasons: the first is that it didn't work for me, and the second is that it created a NAT'd solution which I didn't want.  However, last week I had a moment of clarity and subsequently kicked myself for not thinking of it before, as it is not particularly complicated.  Why not just bridge my Hyper-V network with my wireless one?????

The biggest plus for me with this solution is that the VMs are connected directly to the same network as the host, so will not need any extra network configuration, especially if your host network uses DHCP.  Following the simple steps below will give you instant Internet connectivity in the VMs! 

  • Create an internal Hyper-V network, and give it an obvious name.

image

  • Open the Network Connections folder via the Network and Sharing Center.  Select the wireless adapter and the new Hyper-V internal network you just created, right-click one of them and choose "Bridge Connections".  After a few seconds a new item will appear in the list called "Network Bridge".

image

That's it, you don't need to do anything else.  Your VMs should instantly get access to the Internet as long as they are mapped to the new internal network you have created.  This can be done by opening the settings for the VM and changing the mapped network in the configuration for the network adapter.

One thing I should mention though is that the use of a wireless card to provide network services to Hyper-V is not a supported configuration by Microsoft, although it does work very well :-)