How do I setup a working Wifi/Internet connection on Windows 10 hyper-v?
I have set up a Ubuntu 18.04 instance in Hyper-V. But I don't have any internet connection withing my VM.
I am working on a laptop, connected with Wifi.
I have tried the following.
- Created an internal virtual switch under Hyper-V.
- Open "Hyper V Manager"
- Select "Virtual Switch Manager"
- Under New Virtual Switch, select "Internal"
- Select "Create Virtual Switch"
- Shutdown the Ubuntu VM
- In your VM settings, under "Network adapters" add the virtual switch which you created in step 1
- Open "Network and Sharing Center"
- Select "Change Adapter Settings".
- Select your Wifi Adapter and the Virtual Switch you just made, right click menu option "Create Bridge"
- Start the Ubuntu VM
- Login to Ubuntu
- Wait a minute, the connection should connect..
But it still won't connect.
I have also enabled the MS services:
Routing and Remote Access + Internet Connection Sharing
But still no luck.
How do I get to a working Internet connection over wifi on my VM?
I had to share my host network adapter and made virtual network switch External. Details are.
- Open Hyper-V Manager
- Click "Virtual Switch Manager"
- Click "New virtual network switch"
- Name: NAT, Connection type: "External network", Select the correct network adapter. Tick "Allow management operating system to share this network adapter. See pic 1.
- Right click Ubuntu, select "Settings"
- In Network Adapter, Virtual switch, select "NAT"
- Go to "Control Panel > Network and Internet > Network Connections" in Windows 10
- Right click the network adapter that is in use. For me, it is "Ethernet 2"
- "Properties > Sharing", tick "Allow other network users to connect through this computer's Internet connection" and select "vEthernet (NAT)" in the drop down.
- Tick "Allow other network users to control or disable the shared Internet connection", then OK. See pic 2.
- Start Ubuntu virtual machine and test!
Hope this works for you too!