Duplicate MAC address kills entire hosts

Thomas 1 Reputation point
2020-08-12T14:40:30.2+00:00

Hi,

We have a Hyper-V failover cluster with 3 Win 2019 Datacenter nodes. From time to time we recover some virtual machines to test our backup system.

Lot's of our machines have static MAC address - some are Linux machines, where static mac is recommended and some are Windows machines where we've experienced some connectivity issues, and static MAC resolved all problems.

When we restore a particular machine from backup, attach it to test network (on a production cluster) and one of our administrators forgets to "uncheck" static MAC field in Hyper-V Settings we get a duplicated MAC situation (original and restored VM on the same host) - after starting the machine we get TOTAL NODE CRASH. It happened twice so far - network stops responding, machines cannot migrate to other hosts, vmms is unresponsive and you cannot even shutdown the host server, because unresponsive vmms service is preventing it. We lose all vm's on that node, they are cold-booted from other nodes after the crash.

This is a disaster which just cannot happen anymore! I've got a big complain for Microsoft here - why Hyper-V doesn't simply check if there is a duplicated MAC in vm config and prevents the start of such machine. Instead everything just stops responding...

Question: what can we do in the feature to prevent this from happening?

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,706 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue 36,751 Reputation points Microsoft Vendor
    2020-08-13T09:11:34.697+00:00

    Hi,

    Hyper-V doesn't prevent VMs from booting as duplicate MAC addresses usually only cause the network connectivity issue imho. If you want to avoid the issue of duplicate MAC address, you could choose dynamic MAC address and configure non-overlapping address ranges on all Hyper-V hosts. You could open Virtual Switch Manager on the right of Hyper-V Manager and select Mac Address Range

    17434-2020-08-13-170659.png

    Every time a VM is started, Hyper-V will check if another virtual machine is already using the MAC address. A new MAC address will be regenerated from a pool of MAC addresses if the VM is set to use dynamic MAC address.

    You may refer to these links
    https://video2.skills-academy.com/en-us/archive/blogs/virtual_pc_guy/hyper-v-and-dynamic-mac-address-regeneration
    https://video2.skills-academy.com/en-us/archive/blogs/tonyso/hyper-v-how-to-manage-mac-address-conflicts

    Best Regards,
    Ian

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.