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.
- 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".
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 :-)
Comments
Anonymous
January 01, 2003
Deraldo, I made this bridge with a real NIC. I guess it would work with a dial-up connection, but I don't have one to test it with. Thx, DanielAnonymous
January 01, 2003
Afraid not. I have no idea what causes it, nor if it is specific to a certain laptop make/model. The only other option is to try "Internet Connection Sharing". Regards, DanielAnonymous
January 01, 2003
Pei, I don't know why that it. However, I have seen that same problem with someone else who had the exact same machine, perhaps it is something specific to that computer. DanielAnonymous
September 01, 2008
did you make work the bridge with a dial-up connection? or with the real NIC?Anonymous
September 02, 2008
Yep. it works! thx for your article. Helps me a lot!Anonymous
September 03, 2008
Hi. FYI. as developer, i make my note an 2008 AD server with two virtual machines. one is XP32 and another Vista 32. these 3 machines must share same network. I am working in a project with two different clients for the same host. 3 machines. I put an loopback adapter into the host and create a virtual with it. So now, I can demonstrate my software in an stand alone machine. right? well. the host can access the internet in 3 different ways. By the physical NIC, by the wireless and by the cell phone. To share these connection with my two virtual machines, i use the ICS. works fine! and my reasons to use the 2008 were the same ones that yours. I will make some tests using the bridged way (your way) instead the ICS. I tell you what i get. best regardsAnonymous
September 07, 2008
The "Bridge Connections" menu is gray in my ThinkPad T61. Do you know why?Anonymous
November 08, 2008
This is great. Simply and functional. Thanks!Anonymous
November 17, 2008
Same problem, I have the Bridge Network Connection option grayed out. :( Do you know if that other person found a solution for that one? ThanksAnonymous
December 14, 2008
When i try this, the VM gets a duplicate IP by DHCP. Fixed IPs work fine, so at least i can get them connected.Anonymous
January 30, 2009
Thanks for the elaborated instruction. You saved me hours of frustrating research in just few minutes. It now works like a charm.Anonymous
April 07, 2009
Guys. I believe that the T61 grayed out bridge connections may be due to group policy settings if your machine is on a domain. I can neither bridge connections or setup ICS because of this issue. Afraid the only way around it is to remove your computer from the domain.Anonymous
June 23, 2009
hey..for my 1st VM the bridged connection worked well!!thanks to u.. but for the 2nd one when i try doing the same it doesnt work?? plsss help...Anonymous
August 02, 2009
The reason you see bridge connections grayed out is probably because of a Active Directory policy if you are connected to a domain. If you believe this might be your issue, here is a way around it. Disable you network card that is connected to the network. Open regedit and go to HKLMSYSTEMCurrentControlSetserviceSharedAccess, find the start DWORD key and change it to 2. This enabled the ICS, Bridge capability which has been disabled by group policy. Reboot. The reason you disabled the internet connection is to prevent the AD policy from re-applying when you reboot. Now bridge you connections and then enable the NIC again.Anonymous
October 31, 2010
Thanks very much for this clarity moment that you had! :