4 ms·
Anyone here who can explain how to force Hyper-V to use a specific network adapter for the default switch? I like that one because it provides NAT + DHCP, crea
by password4321 4y ago
Anyone here who can explain how to force Hyper-V to use a specific network adapter for the default switch?
I like that one because it provides NAT + DHCP, creating another switch doesn't.
- jeroenhd 4y agoYou can manually configure the network adapters from the Hyper-V UI. I don't know if you can set a priority order, but you can definitely configure the interface Hyper-V uses for VM network connectivity.
- password4321 4y agoThanks for your reply. In my experience it is a selectable option when creating a new virtual switch but is not modifiable for the default. I have my machine directly connected to my underpowered Remote Desktop client via ethernet, and it always picks that connection instead of the WiFi that actually has internet until I disable ethernet (or maybe the virtual adapter created on top of ethernet, I forget every month) and reboot.
- jeroenhd 4y agoI don't know if it solves your entire use case, but in PowerShell you can change the interface metric number to rearrange connection priorities (https://learn.microsoft.com/en-US/windows-server/networking/technologies/network-subsystem/net-sub-interface-metric https://learn.microsoft.com/en-US/windows-server/networking/...). You have to watch out to pick the right interface (Hyper-V takes over packet routing from your real network adapter in many cases) but it may be worth looking into. Higher metric number means lower priority, so setting the bad connection to a metric of 100 and the real uplink to a metric of 5 may resolve your problem. In Windows 2000-8.1 the control panel GUI was the standard way of accomplishing this, but in modern Windows 10/11 I doubt Microsoft has the setting still accessible. There are still guides out there with screenshots, though: https://www.windowscentral.com/how-change-priority-order-network-adapters-windows-10 https://www.windowscentral.com/how-change-priority-order-net... The automatic metric detection system bases its decision on network speed (https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/automatic-metric-for-ipv4-routes?source=recommendations https://learn.microsoft.com/en-us/troubleshoot/windows-serve...) so virtual 10gbps adapters can cause problems if you use a common network adapter and the custom settings for Hyper-V and such get messed up.