大网数据广告活动
服务器运维问答

Hyper-V server 2019 – Internet not working for Guest VM

· 52CE 我爱测

I’m trying something apparently very simple, and I reviewed former posts for 2 days about the subject without success: Setup a Hyper-V Server 2019 On that server, install a Gen-2 guest Virtual Machine (Windows server 2016 standar…

问题原文

原帖链接 · ChristianT · CC BY-SA 4.0

I’m trying something apparently very simple, and I reviewed former posts for 2 days about the subject without success:

  • Setup a Hyper-V Server 2019
  • On that server, install a Gen-2 guest Virtual Machine (Windows server 2016 standard)
  • That's ALL !

I have been assured by written (by Dell) that the hardware I bought 3 months ago is fit for virtualization…

Setting up a Hyper-Server, and joining it to a domain was pretty straight forward. Even installing the VM was pretty simple.

But I just can’t get the guest VM to connect to the network!

Here is the current state, after I re-started from scratch (meaning reinstalled the computer from zero), and left the default, as generated by Microsoft:

The Host does have access to internet (and is linked to AD) on ethernet NIC#1

  • Assigned Static IP: 192.168.0.96
  • Subnet: 255.255.255.0
  • gateway: 192.168.0.1
  • DNS: 192.168.0.1

From a remote Hyper-V manager (because Hyper-V Server has no GUI), I did create a new Virtual Switch (and only one)

  • Name: vSwitchExternXyz
  • Type: external
  • Linked to the external network using the same NIC#1
  • Allowed management operating system to share this network adapter (this is by default)

When executing an "ipconfig" in command line on the host, I see a new “Ethernet adapter vEthernet (vSwitchExternXyz)” this created, having:

  • Autoconfiguration IP4 Address: 169.254.197.61 (hey, this is a APIPA address !)
  • Subnet: 255.255.0.0
  • gateway: none!

From the remote Hyper-V manager, I did assign this vSwitchExternXyz Virtual Switch (the only one I created in the Host) to the guest VM

  • I left unchecked both options “Enable virtual LAN identification” and “Enable bandwidth management” (those are unchecked by default)

When I start & connect to that only VM, and look at it network config, I get:

  • Autoconfiguration IP4 Address: 169.254.224.167 (again another APIPA address!)
  • Subnet: 255.255.0.0
  • gateway: none!

From that picture, I’m not really surprised I cannot even ping any IP outside the APIPA address range, because the default gateway seems missing. I did try to assign it an IP and valid gateway (same as the host’s), but it made no differences. But I don’t know yet how should a successful configuration looks like.

Questions

  • I have no running environment to compare to in order to see if those defaults are correct. Do the virtual switch & VM’s vNIC adapter both should be given IP addresses?

  • Shouldn’t both virtual switch & VM’s vNIC adapter be in the same subnet than the host (meaning 192.168.0.x), and pointing to the same gateway?

  • What’s wrong with my VM to not access internet?

已采纳解答

原帖链接 · ChristianT · CC BY-SA 4.0

I resorted to Microsoft support to address this issues (it took 2 tech specialists 2.5 hours total to figure it out).

The problem was with the virtual switch which was corrupted for obscure reasons.

It was not enough to just remove the vSwitch and re-create it.

I had to:

  • leave the faulty vSwitch there,
  • create a new vSwitch
  • Assign the new switch to the Guest VM's adapter
  • only then, delete the faulty vSwitch

Problem fixed, thanks to Raj at Microsoft technical support team.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-01-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。