Forum Discussion
Hyper-V Default switch IP address range change. Ver 1809 Build 17763.1
I'm a Linux guy but have to use Windows10 now. Don't want to use VirtualBox or Vagrant as I have HyperV licensed. But I can't make it work sadly. Also additional hypervisor breaks a lot of things in windows10 which requires additional time to make workarounds.
Default vSwitch keeps changing IP address on reboot. There is no DHCP server included so no way to assign a static address to my VM.
Workarounds are not helpful too.
- tried adding new virtual switch and NAT it via PowerShell. It works until reboot only. There is no GUI for that? ok.
- ICS is not working after reboot too, I have to manually reenable it. Adding registry key is not working.
- tried to add external linux vm to route all the traffic, still need ICS which is not working after reboot.
- tried third-party software, it's okay but requires additional payments.
All that bugs persists through ages, seriously? Very disappointed, want my money back.
then inside your VM OS (guest), set a static IP address.
how? well your VM guest will get an IP address anyway, just copy it and make it static. easy
also how come your network doesn't have DHCP? you must be getting internet from somewhere. a router or DSL modem, they must have DHCP in them.
none of them you mentioned are bugs. you just have to know where to use what.
- sn00pSep 04, 2019Copper Contributor
HotCakeX it's definitely bugs, network switch can't change IP address randomly if assigned statically. As simple as that. No other network software do this thing, but MS virtual switch.
Also that aged thing with ICS not working after reboot is a nasty bug too.
NAT is hardly working too, sometimes it's ok, sometimes it's not. Probably arp related, idk.
In conclusion there is no simple setup which allows you to use host internet inside hyperV VM.
Not to mention there are no shared folders so on.I can't use external networks because of this, I have to mount it as samba share (technology from 20 years ago okay). And how to work with VM if there is no external switch with dhcp like on a jet board? It's laptop with windows10, not a server inside infrastructure.
VirtualBox does this sharing in two simple clicks. But Windows10 core denies all other hypervisors with every update.- HotCakeXSep 04, 2019MVP
When you do a route print, you will see that the default vSwitch is not creating a persistent route but rather a temporary one. it's not a bug, it's intentional and the way Microsoft made it.
you can request a feature change through Feedback hub app.
the norm is that when people are running professional servers in their Hyper-V, they set external vSwitch as the network adapter for their VMs, it provides more functionality.
there is also another case when the host is connected to a VPN, if the guest VM use default vSwitch, it will have access to the same VPN as the host. but if the guest VM uses an external vSwitch, it will continue using the Direct Internet connection Even though the host is connected to the VPN. now if the default vSwitch was to get a static IP address forever, it would cause conflicts with host VPN and other scenarios where the subnet of the default gateway on the host changed.
with non-persistent routes like this, default gateway first examines and evaluates the network topology and then based on the available networks and subnets, chooses an IP address.
so again this is Not a bug, it's just how it's made.
I have a normal home router, my Windows 10 is connected wirelessly to it. in my Hyper-V I created an external virtual network adapter and connected all my VMs to that same external vSwitch. I run 3 Windows server 2019 and one of them is a VDI host (yes Nested Virtualization). all of these with a 20$ wireless network adapter and a simple normal home router. it can't be any simpler and easier than that.
I've worked with VirtualBox and VMware Workstation 15 as well, but still Hyper-V is the best.- sn00pSep 04, 2019Copper Contributor
HotCakeX NAT is not about routes, it's about network address translation. And that switch is for NAT isn't it? But it's black-boxed and the only configuration parameter opened (static IP address) is simply broken, changing randomly every time you boot your computer. Why? No clues, nobody does this except MS. And documentation either not complete or it's just a bug.
Again, switch is not allowed to change it's own address randomly if configured statically. If MS made it intentionally, they should fire their developers and hire professionals.
This scenario is a dead horse. It's usable only in few cases. Again, all other virtualization software do things right in few clicks but not MS. Why? No clues.
Windows costs money. And the thing you have to buy yet another software to make it works is just bad. Because it's working pretty weird out of the box and workarounds are broken too.