Hyper-V guest doesn’t see the internet through external virtual switch

hyper-vnetworkingvswitchwindows-server-2012-r2

I have a Windows Server 2012 R2 Essentials host with 1 NIC and I installed a Hyper-V guest of the same type (Windows Server 2012 R2 Essentials). I added an external virtual switch (allowing management operating system to share this adapter) and the VM is connected to that. The guest doesn't indicate internet connection and when I try to repair it, the analysis concludes with a "Ethernet" doesn't have a valid IP configuration.

According to what I've read this should be enough for the VM to see the internet. The host computer has connection, I can browse the web.

Host:

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

Guest:

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 . . . . . . . . . :

I also have some other devices (one tunnel on the guest) and a whole bunch on the host because I tried to go with Internal Virtual Switch by desperation, so I installed RRAS and configured VPN and DirectAccess to enable NAT. That didn't help either, but I need External Switch anyway, because I want to connect to the VM through RDP from home.

What am I doing wrong?


Update: according to the advice I configured the guest's NIC's IPv4 to:

IP 192.168.1.221
netmask 255.255.255.0
gw 192.168.1.254

It still doesn't see the net. ARP table on the host:

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

Best Answer

The Hyper-V guest has the ip address 169.254.209.59. This is an APIPA address. It's only useful for communicating with other local devices that also have an APIPA address. You need to assign a valid ip address, subnet mask, default gateway and DNS servers to the guest.


I have no idea what you're saying or asking in your comments. The virtual switch has an ip address because you've configured it to be shared with the management operating system. This ip address is solely for the purpose of accessing the Hyper-V host itself. It has no bearing on your guest connectivity. You should assign an ip address to your guest just as you would a physical machine. If your network is 192.168.1.0/24 (or whatever) then you need to configure the guest with an ip address in that range just as you would a physical machine. The Hyper-V host is not a router, it does not perform NAT, and it has no involvement in moving traffic from the guest to the actual physical network other than being a physical "conduit" for that traffic.

Related Topic