If given the choice, then Hyper-V wouldn’t be the hypervisor I’d pick first. Don’t get me wrong, there are a number of things I really like:

But then there are some of the things that I don’t like:

And it is in regards to the last point that is one of the biggest headaches for me. When running a VM as a developer, it isn’t unlikely that I want to have Internet access whilst not wanting anyone but me reaching it. The switch type that you want to use in this case is the “Default Switch”, which provides NAT functionality. But what I’ve stumbled upon is that this switch doesn’t handle the case when the host computer is utilizing a VPN. If I remember correctly, the issue lied in how DNS lookups were handled. This was an issue with the version of Cisco AnyConnect I used for work, but work better with FortiClient which we may start using instead. This rendered my virtual machine unable to integrate with other resources on my company’s intranet.

In any case, I wanted to use the Internal Switch type in order to always be able to reach the VM. But since there is no DHCP server, you’ll need to manage the IP configuration manually (unless you actually add a DHCP machine/server to the internal switch). How to do this manual configuration isn’t clear unless you have the knowledge how to do it, which is made apparent by the number of articles I’ve read with incorrect information, at least in part. But then I finally found some articles with correct information.

The only thing that should be configured is the IP address and the network subnet mask. The parts that don’t need to be configured are the default gateway and DNS. The default gateway, i.e. the way packets should go from your computer, is implied to be the switch itself. Unless you have a DNS server configured on a computer connected to the internal switch, then there is no DNS to configure, since no one is there to get the requests.

Regarding the network mask, ensure that it is not used by any other network you’re connected to. I.e., don’t configure if your home router you’re directly connected to is using it for the intranet.