Group: Forum Members
Posts: 14K,
Visits: 83K
|
Building on Jamie’s answer, starting with Win10 1709, Hyper-V has a “Default Switch” that works basically like the NAT function on other hypervisors. It is often the most convenient option if you just want your VMs to be able to access the actual network that your PC is on, since unlike an external switch you might create for this purpose, you do not have to map the default switch to a specific physical network interface, which means that you do not have to keep updating that mapping if the network interface that gives your PC connectivity changes, such as switching between wired and Wi-Fi. An external network mapped to a Wi-Fi adapter can also cause both your host and VMs to start having DHCP problems in some cases (especially if you have a DHCP reservation for your host’s Wi-Fi MAC address), while the default switch would not. The catch is that with the default switch, the VMs are behind a NAT interface, so other devices on your network would not be able to initiate inbound connections to your VM, which can be a problem if your VM wants to host something for other devices on the network. In that case, you would need an external switch instead, which would give your VM an IP on the real network’s subnet. Otherwise, the default switch is the way to go.
Finally, if you like all of the default switch benefits I just described but aren’t running Win10 1709, then if you’re running at least Win10 1607, you can achieve almost the same thing by creating an INTERNAL network, adding a NAT rule on your host with a single PowerShell command, and then configuring static IPs in the VM and the internal network interface on your host. I can elaborate on that if needed.
|