Im looking for the propper guide / way to give a VM Internet Acces?
I used / follow this link: Windows 8 Hyper-V - how to give VM internet access? of @venimus
But now in Windows 11, which setting to change to follow the link?
Im looking for the propper guide / way to give a VM Internet Acces?
I used / follow this link: Windows 8 Hyper-V - how to give VM internet access? of @venimus
But now in Windows 11, which setting to change to follow the link?
That question you linked has multiple answers.
Jamez Mertz's answer is a simple external vswitch, try this first. Those screenshots are still relevant for a GUI approach, but a quick summary: Virtual Switch Manager, create a new External type, attach it to the physical network card that is your internet link, and enable "Allow management operating system to share". Edit the VM's network adapter to use this virtual switch.
A shared external vswitch is bridged. As if you attached a dumb Ethernet switch to the internet link, the VMs, and Windows. Hyper-V assigns MAC address to VMs for layer 2, in fact. VM's IPv6 neighbor discovery and IPv4 DHCP go out the physical link, to whatever box that is your internet router, and they get assigned IP addresses.
Non-trivial networks exist where this simple setup would be inadequate. NICs dedicated for VMs, port security, VLANs. However, these tend to be enterprise features not common on home networks. Ask your network administrator, if there is such a person.
So far this has followed the external switch type per Hyper-V network documentation. At the end of it a mention of NAT, which is another possibility, used by both containers and VMs. On desktop editions of Windows (not Server) a default Hyper-V network exists, which will automatically NAT a Windows IP address to a network for VMs. This is not my first choice, as multiple NATs can be confusing, and unnecessary if IPv6 is in use.
venimus's answer mentions several things: Hyper-V default and internal vswitch types, and Windows Internet Connection Sharing. ICS use case is for Windows desktop edition to share an internet connection. Example use case, your internet router has no Wi-Fi feature, so you use Windows to route and NAT the wired link via a laptop's Wi-Fi antenna to other devices. Yet Hyper-V switch manager (and associated PowerShell command line) can fully define virtual networks. You do not need to configure the host's ICS for Hyper-V, ignore this answer. If you do have a specific reason for Windows to do the NAT, please edit your question to describe your network in detail.