I have a Win2008 R2 server running Hyper-V with two VMs (Win2003 and Win2008R2).
I have two NICs on my server, one for the host, and one for the Virtual Machine Manager.
I have it configured as follows, but the VMS do not have access to the Internet. What am I doing wrong?
ONBOARD NIC for HOST
IP: a.b.c.19
Mask: 255.255.255.192
Gateway: a.b.c.1
DNS1: a.b.c.130
DNS1: a.b.c.131
Additional NIC for Hyper-V
IP: a.b.c.30
Mask: 255.255.255.192
Gateway: a.b.c.1
DNS1: a.b.c.130
DNS1: a.b.c.131
VM1
IP: a.b.c.9
Mask: 255.255.255.192
Gateway: a.b.c.1
DNS1: a.b.c.130
DNS1: a.b.c.131
VM2
IP: a.b.c.20
Mask: 255.255.255.192
Gateway: a.b.c.1
DNS1: a.b.c.130
DNS1: a.b.c.131
Should my Gateways of the VMs be configured special to point to the NIC for Hyper-V?
This might not fix your problem but...any Hyper-V box should have one NIC dedicated to administering the host (ONBOARD NIC for HOST) and one or more NICs dedicated to the VMs (Additional NIC for Hyper-V). I would do this:
Delete your existing Hyper-V network in Hyper-V manager.
On the host, you should now have only 2 NICs visible, ONBOARD NIC and Additional NIC. Leave ONBOARD NIC configured as above.
Disable all services on Additional NIC (including IPv4 and IPv6). You don't need this NIC to be configured with an IP address - Hyper-V will just use this bit of hardware to access the network so as long as it is properly cabled to a configured switch port, they will be able to use it.
Recreate your EXTERNAL network in Hyper-V Manager and make sure that you pick Additional NIC. After you do this, go back into the host's Network Control Panel and you should now see 3 NICs! When you created the Hyper-V EXTERNAL network, it then created an additional virtual NIC and added it to the list. Like the Additional NIC, it should have all services (including IPv4 and IPv6) disabled.
Now turn off both VMs, reassign their NICs to the Hyper-V network, start them, and it should work.
Note: all of this applies assuming that everything is on the same subnet and there is no trunking going on for the switch port that Additional NIC is connected to. If there is trunking, you'll be assigning the VMs to a VLAN but if there is no trunking, DO NOT select the "Use VLAN" checkbox on the VM config page.
Good luck.
Turn off IPv4 Large Send Offloading under advanced setting for the adapter that hosts the HyperV network. Apparently the HyperV virtual switch does not handle this well. It fixed the packet drop issues for me. Hope this helps some people because it took me a while to figure it out.
In a nutshell, if the host can see the internet - then your guests should be able to as well.
Open the Virtual Network Manager and create a new virtual network. Make sure it is bridged (I think Hyper-V uses the term external or something like that) to one of your two adapters - in your case it probably doesn't really matter based on your IP addresses.
Then, in each of your virtual machine configurations, make sure the virtual network adapter is set to be part of the newly created virtual network.
If all that doesn't work, I would try two more things:
Are you using the Legacy Network Adapters? It would take a lot to cause that much network loss but it's something to check for.
Also, any chance that you have a ton of traffic from either of the machines? To narrow it down, try creating an internal network and see if you can access the VMs from the host machine over RDP.
To answer your gateway question, if you're using an EXTERNAL NIC then the gateway should be the same as you're using for any of those IPs. (i.e., the same as the host machine is using).
Also, make sure that either of the machines are setup as routers that are causing a network traffic loop. That would cause the huge packet loss too.