An out-the-box way to let local Hyper-V VMs see the Internet without using a DD-WRT router
Updated 10 Aug 2016 - Revised for Win10 anniversary build 1607
I have posted in the past about using a DD-WRT virtual router to bridge between local VMs on my development PC and the outside world
With the recent changes in HyperV on Windows 10 and Server 2016 we have an alternative as discussed by Thomas Maurer in his post (pre Win10 anniversary build 1607) or this post (post Win10 anniversary build 1607). You can use a NATSwitch, thus removing the need for router VM. This does however raise different issues, that of address assignment, the router was also a DHCP server. However, it does mean I don’t have to mess around with manually setting external IP addresses for the router each time I join a different WIFI network. So on the whole I think iti is a better solution.
My new setup is as follows.
- Using Powershell, create the NATSwitch as per Thomas Maurer’s post.
- On each guest VM set a fixed IP address e.g. 172.92.91.2, with a default route of the NATSwitch’s port on the host OS i.e. 172.92.91.1 and a publicly accessible DNS such as a Google’s 8.8.8.8. Once setup it should be possible to access the internet from the guest VM
- To access each guest VM from the host OS you can just use it’s IP address e.g. 172.92.91.2, this works because the host OS has a connection on the same NATSwitch network, 172.92.91.1. It makes sense to add a hosts files entry on the Windows 10 PC so that the user has a friendly name to access each guest VM e.g.
172.91.92.2 typhoontfs
Once this is all done you seem to have a workable system, only time will tell how it works in practice.