How to get an internet connection on a Hyper-V Virtual Machine using a Virtual Switch to work.

Humphrey Ngugi 0 Reputation points
2026-07-18T08:11:16.24+00:00

Hello,

I had a virtual machine that had a Windows Server 2019 running Active Directory and other services an old virtualization server which later crashed.

On recovery of the virtual hard disk, I launched it on Hyper-V, so now I am unable to get an internet connection. I am using the same interface/port that the new virtualization server uses after setting up the virtual switch.

On the virtual machine it tells me that I am connected but can't access the internet.

It says it can't find the gateway.

I also tried a different NIC but to no avail.

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
0 comments No comments

2 answers

Sort by: Newest
  1. Humphrey Ngugi 0 Reputation points
    2026-07-18T09:49:55.69+00:00

    It still hasn't connected. I followed all the steps and even deleted some of my faded devmgmt.msc adapters on my virtualization server by mistake...

    Also, the vEthernet adapter reads Unidentified network (virtual switch). I think it supposed to read that way.

    User's imageUser's image

    Was this answer helpful?

    0 comments No comments

  2. memoona saleem 0 Reputation points
    2026-07-18T08:26:29.28+00:00

    Since this VM came from a crashed server, it is probably just stuck on its old network settings.

    Try these quick steps inside the VM:

    Fix IP and DNS: Go to your network settings (IPv4). Change the Default Gateway to match your new network's router IP. Because this is an Active Directory server, keep the Preferred DNS as 127.0.0.1, but add 8.8.8.8 as the Secondary DNS so it can access the internet.

    Remove old network cards: Open Command Prompt as Admin, type set devmgr_show_nonpresent_devices=1 and press Enter, then type devmgmt.msc. In Device Manager, click View > Show hidden devices. Look under Network adapters and delete any faded/hidden network cards from the old server.

    Reset network: If it still doesn't work, run netsh int ip reset in Admin Command Prompt and restart the VM.

    Also, just double-check your Hyper-V Virtual Switch manager on the host to ensure it is set to External and connected to the right network card.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.