Forum Discussion
Hyper-V Default switch IP address range change. Ver 1809 Build 17763.1
HotCakeX wrote:
I've been working a lot with Hyper-V and I gotta tell you that the default switch is NOT meant for static IP addressing. in any tutorial or YouTube video you watch you'll see than none of them choose the default switch for static IP addressing.
if you want static IP and never changes, you should make a new virtual network adapter and make it EXTERNAL, then connect it to your PHYSICAL network adapter (all done in Hyper-V switch manager), it will make a bridged connection in your host Windows. then inside your guest OS (VM) you can give a static IP to your OS and it will stay that way and never changes.
IMO default switch is for those who want a quick setup and get a VM up and running fast without any additional settings.
I've been working a lot with Hyper-V, too. The default network adapter is not meant to change IP address ranges with every reboot. Once an IP address is set, it should be immutable. Throwing around with workaround does not remove the issue at hand.
Your described way to get a static IP is fine. However, this doesn't work when I have to test something that involves DHCP. Sure, I can install a NAT with 2 vNICs, one on one external switch and the other on a private switch, but that involves additional hours to setup correctly.
With the built-in network address translation of the Default Switch, this problem is already solved. And for testing purposes it would be perfectly fine, were it not for the non-intended behaviour that the address range randomly changes between reboots of the host computer.
anyhow, I don't see how any of the things you mentioned can possibly take "hours" to setup. if you know the topology you're going to deploy beforehand then it can only takes few minutes to setup. btw you don't have to set anything in the host network adapters (virtual or not), everything happens in the guests.
if you want to set something that involves DHCP? like a Windows server DHCP? you still need external network adapter with static IP set inside the guest OS, as I said in my previous comment.
- DanielNiccoliAug 07, 2019Steel ContributorSetting up the virtual switches takes a few minutes.
I don't have a test environment handy at all times. I certainly don't have one now. So I need to get a software firewall, download the iso, create a new VM, install the firewall and configure it. This takes a bit longer than a few minutes. But that is absolutely beside the point.
The point is, the Default Switch is broken.
> if you want to set something that involves DHCP? like a Windows server DHCP? you still need external network adapter with static IP set inside the guest OS, as I said in my previous comment.
An external network adapter inside the guest OS? Either that configuration or that terminology doesn't make any sense.- HotCakeXAug 07, 2019MVP
look for example in your guest OS/firewall etc you need to set up these few main parameters.
whether you do it using GUI or powershell, terminal etc it's not gonna take so long..
also is there any indication saying that the default switch in Hyper-V must give you an static IP address regardless of host reboot?
I meant making an external network adapter and connecting it to the guest OS.
that config would make sense in a nested virtualization.