Quick note on setting up Linux VMs on Hyper V.
Step 1: Check adapters, test internet connectivity
First, check if the network adapters are attached.
ifconfig
you will see Ethernet, loopback or WiFi adapters.
They look like eth0, lo, wi and you should be getting private IP on those adapters.
If you do, proceed on. If you don’t, please watch my video on how to set up Virtual Switch Manager for VMs.
ping google.com
if you receive packets back, you are good to go.
if you don’t, proceed on with below steps to change settings in Network Manager.
Step 2: Make Changes in Network Manager
Change directory to Network Manager.
$ cd /etc/NetworkManager
$ ls -la
You will see NetworkManager.config file. This is what you need to change.
You may need to sudo to change this.
$ sudo nano NetworkManager.conf
change managed to true and write out and exit.
$managed=true
ctrl + o
ctrl + q
Restart the Network Manager Service.
service NetworkManager restart
or
systemctl restart NetworkManager
Do the ping test again. This time, it should be successful.
Do the updates. It will take some time depending on your distro and updates required.sudo yum update
or sudo apt-get update
yum upgrade
or apt-get upgrade
Thats it, setting up network on Linux VMs.
Teza