Today, I installed Hyper-V on my Windows 8 machine so I could make a VM for a demo I'm giving later this week. I set up the virtual network as an internal network, and then used Windows 8's internal bridging system to bridge the internal network over to the live WiFi.
DISCLAIMER: You're about to mess with registry settings and network settings. You could seriously break things if you do it wrong, and there's no guarantee I've done everything right. Make sure you have a backup before doing anything like this.
For the most part, the network just works. The VM gets an IP address from Hyper-V on the private network, and it's able to get out to the public network transparently. The one problem is that the resulting network bridge is labeled as a "public" network. This means that the host could ping the VM, but the VM couldn't ping the host. Since Windows doesn't see any Internet path on the shared network, it marks it public without any option for making it private:
The key is to trick Windows into thinking that the network is a point-to-point network instead of a traditional Ethernet network, so that it will always be considered a private network. To do this, open REGEDIT and navigate to the section of the registry that contains the network drivers:
HKEY_LOCAL_MACHINE\
System\
Current Control Set\
Control\
Class\
{4d36e972-e325-11ce-bfc1-08002be10318}
Inside this key, you'll find a couple dozen keys for various network adapters. You're looking for the key(s) whose DriverDesc value is "Microsoft Virtual Switch Network Adapter". When you find that key, you need to add a new DWORD value named "*NdisDeviceType" with a value of "1", as illustrated below:
Once you've done this, then reboot the host PC. Once you've rebooted, the network device will not show up in the Network and Sharing Center any more, since point to point network devices don't show in that list. Now the VM will have a private network with the host, so it will be able to access anything that the host normally permits to go through the private section of the firewall.
Recent Comments