How to Connect Virtual Machine to Internet in Hyper-V? – It is easy and simple to configure virtual machines created on Hyper-V to access your physical network and to access the Internet.
How to Connect Virtual Machine to Internet in Hyper-V?
After installing the virtual machine on Hyper-V, the first thing to do is to create a Network Adapter using Virtual Switch Manager and add this network card to the virtual machine.
According to network topology you created, Virtual Switch Manager can use in different scenarios. However, you can apply 2 different methods for virtual machine Internet connection. You can use the following 2 methods to connect to virtual machine to Internet in Hyper-V.
In the Actions panel, click Virtual Switch Manager.
First, add an Internal Virtual Switch for the virtual machine.
Give the Internal Virtual Switch a name and then click the OK button.
For example, to add a network adapter for a Windows 7 virtual machine, click the Right button / Settings on the virtual machine and select the Internal Virtual Switch created by clicking on the Network Adapter on the left panel of the window opened and click the OK button.
Connect to the Windows 7 virtual machine and run it.
When the virtual machine is powered on, configure the TCP/IP configuration of the vEthernet network card created by Hyper-V on your physical computer as follows.
Configure the TCP/IP settings of Windows 7 virtual machine as shown in the following image.
Pinging from the virtual machine to the gateway (192.168.10.1) will succeed as follows.
From Step 1 to Step 9, we actually implemented an Internal Virtual Switch configuration. The reason for explaining this is to show an internal virtual machine on the Internet.
In this step we will add the External Virtual Switch to the Internet by adding it to the Internal virtual machine. Open the Virtual Switch Manager in the same way and click the Create Virtual Switch button by selecting External as follows.
Type a name for the External Virtual Switch and fill in the description. When adding an external network, you need to select the network card that is connected to the Internet of your physical machine.
Reopen the Windows 7 virtual machine network settings and add a new Network Adapter at this time by clicking Add Hardware as shown below.
Add the External Virtual Switch that you created on the virtual machine
Check the virtual machine network settings. You need to get an IP address from our local network as in the image below. If it does not get an automatic IP address, you may need to check your DHCP settings.
Run the CMD command prompt on the Windows 7 virtual machine and test the Internet connection by pinging the Modem IP address and Google DNS server.
Finally, you can check the virtual machine Internet connection by opening an Internet browser on the virtual machine and viewing any site.
How to Connect Virtual Machine to Internet in Hyper-V? ⇒ Video
You can watch the video below to set up the Internet settings of a virtual machine in Hyper-V and also subscribe to our YouTubechannel to support us!
How to Connect Virtual Machine to Internet in Hyper-V?– In this article, we have step-by-step examined how to configure a virtual machine Internet connection using the Hyper-V virtualization program on the Windows 10 operating system. Thanks for following us!
If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!
Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!
Articles Related to How to Connect Virtual Machine to Internet in Hyper-V