Can I get Hyper-V VM's to talk to each other between 2 hosts with a crossover cable?

1

I have two Hyper-V hosts, each with a statically assigned IP 10.0.1.10 (host 1) and 10.0.2.10 (host 2), the subnet mask is 255.255.0.0. I've joined these with a crossover cable.

I create a VM on host 1 and assign it IP 10.0.1.20 (subnet mask 255.255.0.0) and also create a VM on host 2 and assign it IP 10.0.2.20 (subnet mask 255.255.0.0).

I cannot seem to get the VM on host1 to ping host2 or ping the VM on host2. I can successfully ping host1 -> host2 and vice versa. I'm using an external virtual switch, and I have "Allow management OS to share" checked off.

I'm a bit of a networking n00b. Do I need to set gateway IP's or add routes or anything like that?

campbell.rw

Posted 2014-03-28T19:46:47.110

Reputation: 141

Answers

1

rw,

Yes, what you are trying to do is possible.

If your two Hyper-V hosts can ping each other, you're on to a good start.

I suspect it's simply a Windows Firewall issue here.

You mentioned that on you haven't set gateway IPs on your VMs. I'm assuming your VMs are Windows Vista or later. While a default gateway is NOT actually required, if you don't set a default gateway for a connection in Windows, then it will set your Network Location to "Public" and won't allow you to change it. When you're on a Public location then your inbuilt Windows Firewall will stop the vast majority of traffic, including responding to ICMP traffic (pings).

To get around this, try one of the following: 1) Set a default gateway (it doesn't have to actually exist!) which will allow you to change the Network Location. Do this in the Network and Sharing Center - click on the blue link to Public Network and change it to Home or Work. 2) Disable the Windows Firewall and try again. Go to Control Panel -> System and Security -> Windows Firewall and select Turn Windows Firewall on or off from the left side.

Be sure to do this on both VMs!

I hope this helps.

Gund

Posted 2014-03-28T19:46:47.110

Reputation: 398

I've tried this, but I haven't had any success yet. The hosts can ping each other. And VM's that share a host can ping each other, but VMs can't ping their host and VM's on different hosts can't ping each other.

I wonder if the virtual network adapter should be assigned a static IP like the guests and hosts and used as the gateway or something? – campbell.rw – 2014-03-31T14:45:48.177

One thing I did incorrectly that I just noticed was bound my wifi adapter to my virtual switch instead of my wired network adapter, foolish I know :) – campbell.rw – 2014-03-31T20:47:27.453

0

I was having this same problem and for the life of me, I could not figure out what the problem was until I saw the setting for the mac address range...

Virual Switch Manager -> Global Network Settings -> Mac Address Range

So, make sure that the Mac Address Range are not the same between hosts!

VM's accross hosts could now finally ping each other.

SuHwak

Posted 2014-03-28T19:46:47.110

Reputation: 55