Recently, a Ubuntu has been installed in Hyper-V to do some testing, where the Ubuntu network configuration encountered some problems, the following is the collation of these issues.
Hyper-V supports three types of networks: external, internal, private. The Hyper-V private network, like its name, is dedicated to virtual machines, where data communication can only take place between virtual machines, and virtual machines cannot communicate with host hosts and physical networks. The internal network type of Hyper-V allows network communication between the virtual machine and the virtual machine only, and between the virtual machine and the host running Hyper-V, without allowing the virtual machine to communicate with the physical network. The external network type of Hyper-V allows virtual machines to communicate with the physical network, between VMs and virtual machines, between VMS and the host running Hyper-V, and their network to each other.
Obviously to the virtual machine can be online, we need to choose the external network type Hyper-V;
As shown in the following illustration: Hyper-V virtual Machine Network Manager, we should have the following external network connection settings:
For Ubuntu, it should use legacy network adapters.
The virtual machine system is not in the Hyper-V support range, this can be referenced in detail with the support Guest OS, which is obviously not supported in Ubuntu. In this case, you will not be able to install the Hyper-V integration service and you must use the legacy network adapter to use the network.
Also use the Hyper-V external network We set above on the network, as shown below. To avoid interference, there is only one NIC for legacy network adapters.
References:
Hyper-V Internal network type
http://www.xuniji.com/virtualpc/view.asp?id=185
Private network type for Hyper-V
http://www.xuniji.com/virtualpc/view.asp?id=186
External network type for Hyper-V
http://www.xuniji.com/virtualpc/view.asp?id=184
Hyper-V Legacy network adapters
http://www.xuniji.com/virtualpc/view.asp?id=182