Setting up my Hyper-V, I noticed I wasn’t able to connect to the Internet until I found a solution.
I checked a few forums for answers and could not find the trick. Finally, I did a little troubleshooting and followed a post online and it worked (credits below) and here’s the trick. Hint, the last step is the MOST IMPORTANT, LOL!
In order to get the VM connected to the internet, you have to tie it to the Ethernet/Wireless NIC Card. In order to do this, you have to create a “Virtual Switch”.
- Open your Hyper-V Manager
Virtual Switch Manager
Create Virtual Switch
- Give the Switch a Name and then select the External Controller you use to connect to the internet (Ethernet, or Wireless NIC, etc,.)
Note: You must select the way that you are actually connecting to the internet. IE, if your computer is set up to use Wifi or Ethernet, but is currently using Ethernet, you must use Ethernet – the Wifi connection will not work because the host machine isn’t currently using it.
- Right click on the Virtual Machine you want to connect and select
- Under the
Network AdapterSetting select the newly created Virtual Switch
- Under the
- This should enable the connection you use to connect to the internet to be accessible to the VM
IMPORTANT: you may have to do a
ipconfig /release and
ipconfig /renew (Windows) or a
sudo dhclient -v -r and
sudo dhclient -v (Linux) on the remote machine to get it to renew its DHCP settings and retrieve an IP address.
ALSO VERY IMPORTANT:
- You need to disable and then re-enable the Allow management operating system to share this network adapter under the Virtual Switch Manager.
- YOU WILL NEED TO DO TWO OF THESE: FOR WIFI AND ETHERNET! I named mine INTERNET WIFI and INTERNER ETHER. When switching from one network to the other is a good idea to restart your VM or computer all together.
FULL CREDITS TO JAMES MERTZ: https://superuser.com/questions/469806/windows-8-hyper-v-how-to-give-vm-internet-access