Ubuntu 16.04 VM on Windows 10 Hyper-V – No Network Connectivity

hyper-vUbuntuvirtual machine

So I just created the VM and I have no idea why I don't have network connectivity. I've tried a bunch of things to troubleshoot the issues, mostly the following in different combinations:

  • Created internal and external Virtual Switches in Virtual Switch Manager
  • In VM Settings > Network Adapter I've tried selecting both of these virtual switches and have "Enable virtual LAN identification" checked
  • In Windows > Network Connections on my local machine I can see both the internal and external switches. I tried sharing my local ethernet connection with the external but that didn't work
  • In Windows > Network Connections I tried sharing the External Virtual Switch with the Internal but no dice
  • On the Ubuntu side of things I've gone into the Wired connection settings and then IPv4 and set it to automatic, and when that didn't work tried manual. I gave it a known available IP address, netmask, and gateway, but that didn't work either

So where I stand now is I have Ubuntu showing that the wired connection is connected, but I can't access the internet. Any ideas as to how I can troubleshoot this further? I can post screenshots if necessary, but it looks like I can only add 2 per post because I don't have a high enough reputation. Thanks!

Best Answer

I had the same issue on Ubuntu 17.04 running on Hyper-V/Windows 10.

The solution was quite simple once I found out. It looks like the default install option is to use Internal network, which does not grant internet access.

On the Ubuntu virtual machine in Hyper-V:

  1. right click to get to the settings
  2. navigate to the Network adapter
  3. select the Network adapter and in the Virtual switch drop-down list change from "Layered_wi_fi" to "Not connected"
  4. go to the Virtual Switch Manager (on the right in the Hyper-V manager)
  5. select Layered_Wi-fi in the Virtual Switches section
  6. change Connection type from "Internal network" to "External network"

Back on the Ubuntu virtual machine in Hyper-V:

  1. right click to get to the settings
  2. navigate to the Network adapter
  3. select the Network adapter and in the Virtual switch drop-down list change from "Not connected" to "Layered_wi_fi"

Note: first I tried to simply to change from Internal network to External (steps 4-6) in the Virtual Switch Manager\Layered_Wi-fi section. This generated an error repeatedly. I think it was because the setting was in use, but it was not very clear. Once I did steps 1-3 first it worked like a charm.