I have two Ubuntu virtual machines running inside Hyper-V under Windows 10. I need to allow remote access to both of these machines, as well as host.
For this I created an external switch and enabled "Allow management operating system to share this network adapter". I have single controller card (LAN) in host, which is selected for connecting this switch to.
In both vm, I used this switch and assigned a static MAC address, and in router assigned static IP to both MAC address.
Now when running vm, I encounter the scenario where host gets correct reserved IP from router, first VM also gets correct IP from router. But second VM is getting dynamic IP address. I checked in router page, and correct mac address is published from virtual machine, but the IP assigned is still dynamic.
Since this is first time I am running Hyper-V for my project, I am not sure where the root problem is. I verified mac address are not conflicted, correct MAC address is published to router page, and DHCP binding is also correct. Any advise on what to do next will be helpful. The router is provided by ISP, which is ZTE F660. The host is running Windows 10 Pro 21H1.
Here are the screenshots of settings chosen:
Then added same switch to both VMs:
Then assigned two separate MAC address to both machine, under individual VM Network Adapters, and added binding rules in router:
1 Answer
I created an external switch and enabled "Allow management operating system to share this network adapter".
This is correct. I have this setup here with a Kali VM having an IP on my external router. I always get the IP I set.
You also need to set the Guest Machine network settings and I did not see that you did that.
Here is a screenshot of the Guest settings. Make sure each Guest is set for Bridged Networking. This is in addition to the setting for External. I get the same IP on my external router all the time.
3