Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
69 views
in Windows Server by 12 13 22
I'm using Hyper-V to run virtual machines, but I'm unable to connect to the internet from within the VMs. I suspect the issue might be related to the virtual network setup.

Could someone guide me on the proper steps to enable internet access for virtual machines in Hyper-V?
by 26 30 36
0 0
Have you created an External netowrk adaptor

1 Answer

0 like 0 dislike
by 163 206 413

How to enable Internet in Hyper-V for a Virtual Machine?

To enable internet access for a virtual machine in Hyper-V, you need to configure a virtual switch and attach it to the virtual machine as the following:

  • Press Win + S, search for Hyper-V Manager, and open it.
  • In the right-hand pane, click Virtual Switch Manager.
    virtual switch manager
  • Select External under "Create Virtual Switch."
  • Click Create Virtual Switch.
    create virtual switch
  • Choose the network adapter connected to the internet.
  • Check Allow management operating system to share this network adapter if needed.
  • Click OK to save.
    internet for hyper v
  • In Hyper-V Manager, select the VM you want to enable internet for, and make sure it's shut down to can edit its settings.
  • Right-click on the VM and choose Settings.
  • Under Hardware, click Add Hardware (if no network adapter exists).
  • Select Network Adapter and click Add.
    add network adapter
  • Select the newly added Network Adapter.
  • From the dropdown menu under "Virtual switch," choose the virtual switch you created earlier.
  • Click Apply and then OK.
  • Start the VM.
  • Now, Open the VM and log in to its operating system.
  • Ensure the VM's network adapter is set to obtain an IP address automatically (DHCP).
  • Open Control Panel > Network and Sharing Center.
  • Click Change adapter settings.
  • Right-click the network adapter and choose Properties.
  • Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  • Ensure Obtain an IP address automatically and Obtain DNS server address automatically are selected.

You might also like to read The Boot Configuration Data for your PC is missing or contains errors

by 22 24 29
0 0
Very helpful
If you don’t ask, the answer is always NO!
...