Hyper-V guest虚拟机不会通过外部虚拟交换机查看Internet

我有一台带有1个NIC的Windows Server 2012 R2 Essentials主机,并安装了相同types的Hyper-V guest虚拟机(Windows Server 2012 R2 Essentials)。 我添加了一个外部的虚拟交换机(允许pipe理操作系统共享这个适配器),虚拟机连接到这个虚拟交换机。 客人不表示互联网连接,当我尝试修复它时,分析结束与"Ethernet" doesn't have a valid IP configuration

根据我所读到的,这应该足以让虚拟机看到互联网。 主机有连接,我可以浏览网页。

主办:

 Ethernet adapter vEthernet (Internal Virtual Switch): Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::f06b:9607:17f9:f2e8%37 Autoconfiguration IPv4 Address. . : 169.254.242.232 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : Ethernet adapter vEthernet (External Virtual Switch): Connection-specific DNS Suffix . : IPv6 Address. . . . . . . . . . . : 2602:304:791c:4270:3cfc:fd08:c467:3f3c Link-local IPv6 Address . . . . . : fe80::3cfc:fd08:c467:3f3c%21 IPv4 Address. . . . . . . . . . . : 192.168.1.253 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : fe80::6655:b1ff:fe6d:a1f0%21 192.168.1.254 

客人:

 Ethernet adapter Ethernet: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::2d32:ed0b:c32e:d13b%12 Autoconfiguration IPv4 Address. . : 169.254.209.59 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : 

我还有一些其他的设备(客户端上的一个隧道)和主机上的一大堆,因为我试图用内部虚拟交换机去绝望,所以我安装了RRAS,并configuration了VPN和DirectAccess来启用NAT。 这也没有帮助,但我需要外部交换机,因为我想通过RDP从家里连接到虚拟机。

我究竟做错了什么?


更新:根据build议,我configuration客户的NIC的IPv4到:

 IP 192.168.1.221 netmask 255.255.255.0 gw 192.168.1.254 

它仍然没有看到networking。 主机上的ARP表:

 Interface: 127.0.0.1 --- 0x1 Internet Address Physical Address Type 224.0.0.22 static 224.0.0.251 static 224.0.0.252 static 224.0.0.253 static 232.242.254.169 static 239.255.255.250 static Interface: 192.168.1.253 --- 0x15 Internet Address Physical Address Type 169.254.242.232 00-00-00-00-00-00 invalid 169.254.255.255 00-00-00-00-00-00 invalid 192.168.1.221 00-00-00-00-00-00 invalid 192.168.1.252 10-bf-48-7e-18-58 dynamic 192.168.1.253 00-00-00-00-00-00 invalid 192.168.1.254 64-55-b1-6d-a1-f0 dynamic 192.168.1.255 ff-ff-ff-ff-ff-ff static 224.0.0.22 01-00-5e-00-00-16 static 224.0.0.251 01-00-5e-00-00-fb static 224.0.0.252 01-00-5e-00-00-fc static 224.0.0.253 01-00-5e-00-00-fd static 232.242.254.169 01-00-5e-72-fe-a9 static 239.255.255.250 01-00-5e-7f-ff-fa static 255.255.255.255 ff-ff-ff-ff-ff-ff static 

Hyper-V guest虚拟机的IP地址为169.254.209.59。 这是一个APIPA地址。 只有与其他本地设备(也有APIPA地址)通信才有用。 您需要为访客分配有效的IP地址,子网掩码,默认网关和DNS服务器。


我不知道你在说什么,或者在你的评论中提问。 虚拟交换机具有IP地址,因为您已将其configuration为与pipe理操作系统共享。 该IP地址仅用于访问Hyper-V主机本身。 它对您的访客连接没有任何影响。 你应该为你的客户分配一个IP地址,就像你物理机器一样。 如果您的networking是192.168.1.0/24(或其他),那么您需要使用该范围内的IP地址来configurationguest虚拟机,就像物理机器一样。 Hyper-V主机不是一个路由器,它不执行NAT,也不涉及将来自客户的stream量转移到实际的物理networking,而不是作为该stream量的物理“pipe道”。

这是VLAN ID 。 如果我记得正确,当您创build外部虚拟交换机时, VLAN IDcheckbox被禁用。 当我将虚拟机添加到该外部交换机时,虚拟机已启用并设置为2.我需要在虚拟机networking设置中取消选中该VLAN ID ,并解决了问题, ARP表开始在两端填充,主机和客人现在可以互相ping通。 他们当然在同一个子网上。