Forum Discussion
Bala Sundaram
Sep 24, 2018Brass Contributor
Hyper-V Default switch IP address range change. Ver 1809 Build 17763.1
Can one confirm IP address range changed to 192.168.X.Y Subnet 255.255.255.240 from 172.X.X.X Also changes the subnet randomly on every Hyper-V services startup. 192.168.X.Y . X can change from 5...
kazuo_yamauchi
Dec 18, 2018Brass Contributor
17763.194 has same issue.
According to the Microsoft-Windows-Hyper-V-VmSwitch/Operations log, it shows that the Default Switch is recreated each time the machine is booted.
(When started in safe mode with networking, it is not recreated, so it remains on the same subnet as last normal boot.)
(When started in safe mode with networking, it is not recreated, so it remains on the same subnet as last normal boot.)
cbj4074
Dec 31, 2018Brass Contributor
And that's precisely why this behavior is so annoying.
Even though I'm hard-coding a static IP in the VM during provisioning (based upon the dynamic IP that Hyper-V assigns via the Default Switch), as soon as I restart the host machine, the IP address class/range may very well change, which makes the VM network configuration inoperable.
To be clear, hard-coding a static IP in the VM is not a problem, as long as the Default Switch in Hyper-V doesn't change the IP address class. But when the guest IP address's first three octets are changing on every host machine reboot, there is simply no reliable means by which to configure a guest VM to use a static IP address. Assigning a static IP during provisioning is a trivial matter in every other virtualization solution! The fact that it's impossible in Hyper-V is bewildering.
Is anybody aware of an official "issue" / "bug report" that documents the behavior we're discussing in this thread?
- Remon liDec 31, 2018Copper Contributor
Acturally, it will change to 192.168.x.x after several more rebooting.
- cbj4074Dec 31, 2018Brass Contributor
As a concrete example, the Default Switch in Hyper-V assigns 172.17.123.149 upon initial VM provisioning, and then I reboot and the address changes to 172.18.63.196. (At least it's not 192.168.x.x! That happens some portion of the time, too!)
As far as I'm aware, there is no means by which to configure this IP address range.
Even the folks working for HashiCorp's Vagrant can't figure out how to nail-down a static IP address in Hyper-V; see: https://github.com/hashicorp/vagrant/issues/8384 . If they can't figure it out, the rest of us are hopelessly lost...