I have created Ubuntu 20.04 VM on my Hyper-V. I added there 2 network switches:
- external for internet connection
- private for isolated network
The problem is that this VM cannot connect with private network. eth1 is a private network and is all the time in Connecting status (aslo notification "activation of network connection failed" is shown)
eth0 is normal internet switch
It is a little bit weird that this connection does not work and I cannot create isolated network between Ubuntu and other machines. can you help me with that?
41 Answer
In this particular case - after discussion - it turned out that there was no DHCP set up on the secondary network. Therefore the default connection never came up, it had no configuration and waited to find something.
The alternatives here are either:
- Configure your guests with static IPs.
- Like #1 plus only doing this for one of the guests and then adding and configure a DHCP service on this guest to serve that to the others
- Set up a dhcp server on the host that will handle this network, in this cases with libvirt you can easily do so in your network config which will add a dnsmasq service to provide that.
- Bridge this additional network to a real device on a network that has a dhcp service
- there are more variants for sure ...
Neither of these is right or wrong, it depends on what you want to achieve. @Developus has chosen #1 without setting up an additional internal DHCP server for more machines to fetch from it.