I like Hyper-V. I really like it. But I’m not blind for shortcomings either. The biggest frustration for me has always been the lack of NAT. Up until now I was using ICS (Internet Connection Sharing) but this was far from perfect;
» It used the same IP address range as the Windows Phone “Internet Sharing” feature. So when I want to tether I had to disable ICS and thus lose connectivity inside my VMs. Really annoying when you need to have both.
» Sometimes I’m connected through an Ethernet cable, other times via WiFi. Having to switch the ICS to a different adapter requires quite some clicks. I semi-automated this with PowerShell, but it wasn’t perfect.
» You can’t establish a Cisco AnyConnect VPN connection when ICS is enabled. You can enable it after the connection is established, but still.
» ICS seems less loved in Windows 8 and Windows 8.1. I often had no connectivity until I disabled ICS on my adapters, even though I wasn’t actively using it at the time.
But if you want your VM to have internet connectivity without putting it directly on your network (avoid machine name conflicts, avoid people accidentally connecting to “your” VM instead of theirs, …) there’s little choice, until now.
A perfect match
Ironically, the solution lies with a competitive product; VMWare’s NAT Service. When you install VMWare’s virtualisation product (like Player), it installs a Windows service and creates a network adapter that has NAT capability. You can then connect your Hyper-V Virtual Switch to the VMnet8 adapter and you’re all done!
I accidentally stumbled upon this “solution” when it was mentioned by Thomas Vochten on Twitter.
He was kind enough to write it up into a blog post; http://thomasvochten.com/archive/2014/01/hyper-v-nat
It immediately solved all of my issues with ICS and took away my biggest frustration with Hyper-V
Hope it helps you too!