Wednesday, April 21, 2010

Hyper-V MAC conflicts

So here's an interesting one I came across recently;

When you run (in this case) HP Teaming on your NICs with Hyper-V on Server 2008 R2 you will get the following error... a lot.

Port {Teaming NIC GUID} was prevented from using MAC address {MAC of a VM} because it is pinned to port {GUID of VMs NIC}.

The real symptom is erratic pings and/or connectivity to your VMs. It will show mostly as 1 or 2 dropped packets every now and then.

Reason is, after 2008 R2 the networking in Hyper-V was secured to prevent MAC spoofing (A huge vulnerability up to this point). Problem is, the HP Teaming NIC want to effectively spoof all the MACs behind it, so it can control the load balancing etc... tsk tsk, what to do, what to do...

Solution is simple, thankfully there's a real easy tick box to turn that shiz off;
(This is from within System Centre Virtual Machine Manager, but same setting is there in Hyper-V Manager)



















Hopefully this saves someone some pain.

EDIT: Please post your mileage on this one if you do come across it. Not 100% sure that it's the final answer in my particular problem. I may be looking at deciding NIC teaming (With HP at least) is not workable.

As it turns out this didn't solve our particular problem at all.
In our case the error being reported around the MAC addresses jump between ports was symptomatic of a loop in the network (Split Horizon)
Hyper-V switching seems to be very sensitive to this and there was no other evidence of this on the network, however when the offending device (Cisco Airport) was removed the problem vanished immediately.

A great success! So if you see this MAC address changing very often then check your network for loops (via segment isolation)