keepcalculator

06 Numbers and Powers

Hyper-V VM No Internet Access: Fixes That Work

Card No. 06·72167 · Updated · Standard formula, shown below

If your Hyper-V virtual machine has no internet access, the fix usually involves switching the virtual switch type to Default Switch or External, or reconfiguring the VM’s network adapter. This article explains why Hyper-V VMs lose connectivity and provides step-by-step solutions for Windows 10, Windows 11, and Windows Server.

Why Hyper-V VMs Lose Internet Access

Hyper-V uses virtual switches to connect VMs to the network. There are three types:

  • External – Bridges the VM to your physical network via your host’s NIC. This is the most common choice for internet access.
  • Internal – Allows communication between VMs and the host, but not to the internet unless you enable NAT or routing.
  • Private – Only VMs can talk to each other; no host or internet connectivity.

If your VM is set to Internal or Private, it won’t have internet. Another common cause is that the virtual switch is bound to a wireless adapter that doesn’t support bridging properly, or the VM’s network adapter is disabled in its guest OS.

Quick Fix: Use the Default Switch

The Default Switch is created automatically when you install Hyper-V. It uses NAT (Network Address Translation) to give VMs internet access through the host’s network connection. If your VM is connected to the Default Switch and still has no internet, try these steps:

  1. Open Hyper-V Manager.
  2. Right-click your VM and select Settings.
  3. Under Hardware, select Network Adapter.
  4. In the Virtual switch dropdown, choose Default Switch.
  5. Click OK and restart the VM.

If the Default Switch isn’t listed, create a new internal switch and enable NAT using PowerShell (requires admin):

New-VMSwitch -SwitchName "NATSwitch" -SwitchType Internal
New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NATSwitch)"
New-NetNat -Name "NAT" -InternalIPInterfaceAddressPrefix 192.168.0.0/24

Set Up an External Virtual Switch

An external switch is the most reliable way to give a VM internet access because it connects directly to your physical network. Here’s how to create one:

  1. In Hyper-V Manager, click Virtual Switch Manager (right side).
  2. Select Create Virtual Switch → External → Create Virtual Switch.
  3. Give it a name (e.g., “External”).
  4. Under Connection type, select your physical NIC (Ethernet or Wi-Fi).
  5. Check Allow management operating system to share this network adapter if you want the host to still have internet.
  6. Click OK. Your host’s network may briefly disconnect.

Then assign this switch to your VM’s network adapter (same steps as above). If you use Wi-Fi, external switches often fail to bridge properly; in that case, use the Default Switch or a NAT setup instead.

Check the Guest OS Network Settings

Sometimes the problem isn’t the virtual switch but the guest OS. After connecting the VM to the right switch, verify:

  • The VM’s network adapter is enabled in Device Manager (Windows guest) or via ip link (Linux).
  • DHCP is enabled – most virtual switches provide IP addresses via DHCP. In Windows, run ipconfig /release then ipconfig /renew.
  • DNS is set correctly – try 8.8.8.8 as a test.
  • The guest firewall isn’t blocking outbound traffic.

If the VM gets an APIPA address (169.254.x.x), it means DHCP isn’t working. This often happens when the virtual switch is misconfigured.

Common Problems and Their Solutions

  • Wi-Fi host: External switches often don’t work with Wi-Fi. Use Default Switch or NAT.
  • Host loses internet after creating external switch: Enable “Allow management operating system to share this network adapter” or reconnect the host NIC.
  • VM can ping IP but not domain names: DNS issue – check the guest’s DNS settings.
  • Multiple VMs can’t talk to each other: Put them on the same internal switch.
  • After Windows update, VM loses internet: Recreate the virtual switch or update Hyper-V integration services.

Advanced: NAT with PowerShell

If you prefer a custom NAT setup (useful for static IPs or port forwarding), you can create an internal switch and configure NAT manually as shown earlier. This gives you more control than the Default Switch. For port forwarding, use New-NetNatStaticMapping. Example:

New-NetNatStaticMapping -NatName "NAT" -Protocol TCP -ExternalIPAddress 0.0.0.0 -ExternalPort 3389 -InternalIPAddress 192.168.0.2 -InternalPort 3389

This forwards RDP (port 3389) to the VM. Remember to allow the port through the host firewall.

Hyper-V vs. Other Virtualization Tools

Compared to VirtualBox or VMware, Hyper-V’s networking is more integrated with Windows. VirtualBox uses host-only and NAT adapters by default, which are easier for beginners. Hyper-V’s external switch is more performant but can be tricky with Wi-Fi. If you’re on Windows 10/11 Pro, Hyper-V is a solid choice, but for simple VM use, VirtualBox’s default NAT might be less frustrating.

Frequently Asked Questions

Why does my Hyper-V VM have no internet but the host does?

Usually because the VM is connected to an internal or private switch, or the external switch is bound to a Wi-Fi adapter that doesn’t bridge correctly. Switch to the Default Switch or create a proper external switch on a wired NIC.

Can I use Wi-Fi for an external switch?

Technically yes, but it often fails because Wi-Fi adapters don’t support bridging in the same way as Ethernet. If you must use Wi-Fi, use the Default Switch or a NAT setup instead.

How do I assign a static IP to a Hyper-V VM?

Inside the guest OS, set a static IP in the same subnet as the virtual switch (e.g., 192.168.0.2 with gateway 192.168.0.1 for a NAT switch). For an external switch, use an IP in your physical network’s subnet.

What is the Default Switch in Hyper-V?

It’s a built-in virtual switch that uses NAT to give VMs internet access through the host’s connection. It’s created automatically when you enable Hyper-V and is the easiest way to get VMs online.

Why does my VM get a 169.254.x.x address?

That’s an APIPA address, meaning DHCP didn’t work. Check that the virtual switch is properly configured and that the guest’s network adapter is set to obtain an IP automatically.

Can I use Hyper-V on Windows 10 Home?

No, Hyper-V is only available on Windows 10/11 Pro, Enterprise, or Education. On Home, you can use VirtualBox or VMware Workstation Player instead.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →