centos VM unable to access the internet from hyper-V network

I had no internet connection on a fresh Centos 7 install. In my case it was because eth0 was down.

Check the status of your devices with

nmcli device

If the ethernet device (usually eth0) is "disconnected", bring it up with

nmcli connection up eth0