Sep 24 2018 10:19 AM
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 51 thru 180.
Although this is working on DHCP based IP assignment on guests, It is causing issues on static IP as it keeps changing after every boot
Regards,
Bala
Sep 24 2018 03:50 PM
It appears to be very random.
Default switch again reverted back to 172.17.X.X .
Strange.
Oct 21 2018 12:41 AM
Yes, I got same problem and can not find any answers to get a fixed ip for default switch.
Nov 30 2018 07:34 AM
Take a look at your Default Switch in Virtual Switch Manager, is it set to "External Network" with a defined controller or is it set to "Internal Network"?
Nov 30 2018 10:15 AM
Dec 03 2018 08:54 AM
@Bala Sundaram is correct in that the Connection type cannot be changed for the Default Switch (all of the options are grayed-out), @H3ALY , even with all VMs powered-off.
In any case, I have the same problem/question as @Remon li . All I'm trying to do is assign a static IP address to a guest VM so that it doesn't change on me unexpectedly. I'd really like to satisfy the following requirements:
It sounds as though this is a two-part problem, and the first part is fixed in Build 17763.134, so at least the subnet will no longer change at random.
@Bala Sundaram , when you say, "Erratic IP address assignment issue is fixed in Build 17763. 134", how many of the four octets are now "fixed"? The first three? In other words, do you now find that the address is predictably set to 192.168.XX, where XX never changes unexpectedly (nor the 192.168 part)?
Thanks for any clarification that you're able to provide!
Dec 04 2018 09:01 PM - edited Dec 04 2018 09:03 PM
Hello cbj4074,
I do not know why I said something very wrong. Sorry for misleading. I checked again, It appears the unpredictable IP address on default switch issue exists in build 17763.104 too. Darn thing assigns CLASS C (172.17.239.XXX) or CLASS D (192.168.75.XXX). It is still unmanegable. May be I was clouded by the workaround I had in place.
Basically I created a work around to take advantage of default switch as my two Physical NICs are teamed and fault tolerant.
Regards,
Bala
Dec 06 2018 05:23 AM
17763.168 released , is it fixed or not ?
Dec 06 2018 06:31 AM
Dec 06 2018 06:34 AM
Dec 06 2018 06:39 AM
Too bad it is a pretty cool feature that is not working as we want. May be the development team has other ideas I suppose. As this is an ICS based knock off functionality, I am not surprised. ICS behaves exactly the same and unmanageable too.
Dec 06 2018 06:48 AM
No problem at all, @Bala Sundaram . I really appreciate the info you've shared thus far, and thank you for clarifying your observations.
In Hyper-V on the mainline Enterprise branch (Build 1803 17134.345), I've only ever seen the Default Switch assign a Class B address in the 172.X.X.X range, and the last three octets seem variable.
Although, when I create a new External Switch (haven't tried the other types), it is assigned a Class C address in the 192.X.X.X range.
Are you sure that in your particular case the class B vs. class C assignment isn't based simply on the type of switch (Default, External, Internal, and Private)?
In any case, until there is some simple means by which to set these values statically, this behavior is going to be problematic for automation, period. 😞
Dec 06 2018 06:58 AM
Dec 10 2018 10:49 AM
Thanks again for sharing your observations @Bala Sundaram .
I can confirm that the switch type does not determine assigned IP address class, as you suggest. Indeed, when using the Default Switch, my colleagues and I receive a mix of 192 and 172 addresses if we provision VMs repeatedly.
To work around this, we've had to implement scripts that run at the end of the provisioning process, within the VMs, to detect and set the IPv4 and gateway addresses statically.
If there's any upside to the Hyper-V Switch behavior, it's that once a static IP is hard-coded within the VM, Hyper-V seems happy to issue it to the client whenever the VM is powered-on.
That said, I have not tried rebooting the host machine, starting/stopping the Hyper-V service, etc. between VM boots to see if that behavior remains consistent...
Dec 10 2018 06:40 PM
I am glad you got it sorted out. Pretty cool.
BTW...Regarding your comment "I can confirm that the switch type does not determine assigned IP address class, as you suggest"
One needs to be on Insider Build 17763.168 to get consistent CLASS D IP address on Hyper-V Stop/Starts. Sorry do not know the build number for W2K16 which I am told is also based on same code path of Windows 10K.
Regards,
Bala
Dec 11 2018 09:39 PM
Any news on 17763.194 ?
Dec 17 2018 10:06 PM - edited Dec 17 2018 10:11 PM
Dec 30 2018 05:30 PM
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?
Dec 30 2018 05:49 PM - edited Dec 30 2018 05:50 PM
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...
Dec 30 2018 05:53 PM
Acturally, it will change to 192.168.x.x after several more rebooting.