Friday, August 8, 2025

Hyper v network issue in Window servers Virtualization (Physcial internet working)








 Great! Since you're using Hyper-V, here’s a step-by-step guide to fix the no internet/network issue in your Windows VM hosted on a physical server with this IP setup:

  • Physical Server IP: your main server ip like 192.168.0.90 or 192.168.1.120 etc

  • Subnet: 255.255.255.0 as per your ip class

  • Gateway: Default gateway 

  • DNS: any/given by ISP

Let’s get your VM connected to the internet through Hyper-V.

✅ Step-by-Step: Get Network Working on a VM in Hyper-V (Windows Server 2022)


๐Ÿ”น Step 1: Open Hyper-V Manager

  • Press Start, search for Hyper-V Manager, and open it.


๐Ÿ”น Step 2: Create an External Virtual Switch

  1. In the right pane, click Virtual Switch Manager.

  2. Select New virtual network switchExternal → Click Create Virtual Switch.

  3. Name it: ExternalSwitch.

  4. Under Connection type, select your physical adapter:

    • Broadcom NetXtreme Gigabit Ethernet.

  5. Check: ✅ Allow management OS to share this network adapter.

  6. Click OK to save.


๐Ÿ”น Step 3: Assign the Switch to Your VM

  1. In Hyper-V Manager, right-click on your VM → Click Settings.

  2. In the left pane, click on Network Adapter.

  3. On the right, set Virtual Switch to ExternalSwitch.

  4. Click OK.


๐Ÿ”น Step 4: Boot into the Virtual Machine

Let the VM start up, then log into Windows OS inside the VM.


๐Ÿ”น Step 5: Configure Network in VM (Static or DHCP)

๐Ÿ‘‰ Option A: Use DHCP (Recommended if network supports it)

  1. Go to Control Panel > Network and Sharing Center.

  2. Click Change Adapter Settings.

  3. Right-click Ethernet → Properties.

  4. Select Internet Protocol Version 4 (TCP/IPv4) → Click Properties.

  5. Select:

    • Obtain an IP address automatically

    • Obtain DNS server address automatically

  6. Click OK and close.

✅ Try opening Google.com or pinging from CMD:

ping 8.8.8.8 ping google.com

๐Ÿ‘‰ Option B: Use Manual Static IP (If DHCP doesn’t work)

  1. Follow steps 1–4 above.

  2. Set these values:

    • IP Address:  (next available IP)

    • Subnet Mask: 255.255.255.0, depend on your ip

    • Default Gateway: Default/isp

    • Preferred DNS: dns

    • Alternate DNS: 8.8.8.8 (optional)

  3. Click OK → Close.


๐Ÿ”น Step 6: Test Internet in VM

Open CMD and run:

ping 8.8.8.8 ping google.com

Open a browser and try browsing to check DNS resolution.


๐Ÿงช Troubleshooting if It Still Doesn’t Work

ProblemFix
No IP or limitedTry switching between DHCP and Static
DNS not resolvingUse Google DNS 8.8.8.8
No response at allRecreate the Virtual Switch
Firewall blockingDisable Windows Firewall temporarily for testing