We frequently create Hyper-V virtual machines for users who occasionally need Linux environments. We prefer this method over Windows Subsystem for Linux (WSL) due to security concerns, as WSL VMs are tied to user profiles and usually inactive. We utilize OpenVOX for managing our Linux systems and prefer VMs to use their own IP addresses instead of NAT for better identification and management. Therefore, it's crucial to ensure the MAC addresses assigned to these VMs are unique. We're considering using the prefix 00:15:5D, which I believe is the standard Hyper-V OUI prefix, followed by two pairs from the host's MAC and adding a number that increments for each VM (typically ending in :00). Does this approach sound reasonable?
2 Answers
It’s interesting to note that Hyper-V can automatically assign a dynamic MAC address to each virtual network interface card (vNIC). However, you’re right about needing static MACs if you require DHCP reservations based on those addresses. There's no auto-sync between hosts for MACs, especially unless they're clustered, so it’s wise to generate static MACs that ensure uniqueness for your setup.
To set a static MAC address for your Hyper-V VM, you can go to Hyper-V Manager, right-click on the virtual machine, choose Settings, then under the Network Adapter, look for Advanced Features. Just remember, the VM needs to be off to make this change. Regarding the MAC address, it’s good that you're aware 00-15-5D is the starting point, but make sure that if you're handling multiple Hyper-V hosts, you adjust the virtual switch MAC address range to prevent collisions—those default ranges often overlap.
Thanks for the tip! I’m already familiar with setting these up, I just wanted to confirm the 00-15-5D prefix and emphasize that I always create a new virtual switch since the default usually sticks to NAT.
Just to clarify, the MAC addresses are chosen based on the last two octets of the host's IP at the time Hyper-V was installed. If your hosts have duplicate IPs during that setup, you could end up with MAC address collisions.

Exactly! I'm interested in ensuring those static MACs are unique. Any more tips or best practices to follow?