Windows 10 Hyper-V Virtual Machine requires internet access for an operating system such as Ubuntu 18.04.1, after installing Ubuntu 18.04.1 LTS on Hyper-V manager. Hyper-V manager network support is not very easy to use and understand but it can be done by manipulating some settings in the Hyper-V manager. So in this case you have to share your PC internet network with the created Hyper-V virtual machine, in order to do that, you have to setup a virtual switch through your PC’s internet network. The Hyper-V manager allows you to manage virtual switches, which are logical switches that connect virtual machines. The Hyper-V virtual switches can be External, Internal or Private. In this article, I will guide you on how to share internet to Hyper-V Virtual Machine in Windows 10.
Before starting the guide, we assume that you have already enabled Hyper-V and created a Virtual Machine through Windows 10 Hyper-V enhanced manager mode. Just make sure that you have an internet connection throughout the process.
So let’s start with the step-wise guide.
Step 1: Create Virtual Switch
Open up Hyper-V manager as shown above, from the Actions panel, click on the Virtual Switch Manager as highlighted above.
In the Virtual Switch Manager, select New virtual network switch option from the navigation pane. Under the Create virtual switch, select the Internal type of virtual switch as shown above. Now click on the OK button to proceed.
Now, for configuring Virtual Switch properties, you have to assign a name (any name you like) for the virtual network as highlighted above.
After assigning the virtual network name, under the Connection type click to select the Internal network radio button as highlighted above. Now make sure that you have selected the right option and click on the Apply button first and then on OK button as shown above. This will apply changes and create the Internal Virtual Switch for Hyper-V.
Step 2: Network Adapter Settings
After creating a virtual switch, form the Hyper-V manager, click on the Ubuntu 18.04.1 LTS settings options as highlighted above.
After Settings for Ubuntu 18.04.1 LTS opens up, from the left navigation pane, select the Network Adapter option as highlighted above. Under the Network Adapter, make sure that you have selected the virtual switch you have created from the drop-down menu as highlighted above. Now simply Apply and click the OK button as shown above.
Step 3: Share Network Connection with Virtual Network
From the Windows settings, go to Network & Internet settings. Under the Network & internet settings choose the Status option from the navigation pane as shown above. Now, under Change your adapter settings, click on the Change adapter options as highlighted above. This will open up the Network Connections window from the control panel.
From the Network Connections window, you can see that a virtual connection has been created with the specified name as highlighted above.
Right-click on the Wi-Fi network that your PC is connected with as highlighted above. From the context menu, click on the properties option. This will open up the Wi-Fi properties.
From the Wi-Fi properties dialog box, open up the Sharing tab. Under the Internet Connection Sharing, make sure that you have check-mark the “Allow other network users to connect through this computer’s Internet connection” checkbox option and under the field of Home networking connection, you have selected the created virtual connection as shown above. Make sure you have unchecked the other option as shown above. Now simply click OK button to apply changes.
Now, this should do!
Step 4: Check Internet Connectivity
From the Hyper-V manager, connect to start your Ubuntu Virtual Machine. Open up a browser and check if your Virtual Machine is now connected to the internet connection as shown above.
That’s it! Hope this article helped you to share Internet connection to your Hyper-V virtual machine. If you have any confusion about this process please let us know in the comment section below.