I'd like to use virt-install to create a VM with a specific MAC address. The virt-install man page has this restriction about specifying a MAC address:
For Xen virtual machines it is required that the first 3 pairs in the MAC address be the sequence '00:16:3e', while for QEMU or KVM virtual machines it must be '52:54:00'.
What's the purpose of this restriction?
Note that when I create instances with OpenStack (which is using kvm via libvirt), the instances are assigned MAC addresses start with fa:16:3e
, and everything seems to work fine.
Standard (good) software engineering practices. The first three octets (bytes) of a MAC address are the OUI (organizational unique identifier), which, as the name suggests, uniquely identify the "manufacturer" of the NIC. These are registered with the IEEE and any number of lookup tools can be used to map an OUI to a name.
As you might expect, the specific OUIs you mentioned are registered for Xen and KVM, and will show as such if a user runs e.g.
lspci
orlshw
inside the guest.You can change them, but the result will be a misidentification at best. Worst case, these values could somehow be defaults in some part of the virtualized NIC backend (Xen bridge, etc.), with the result that routing to a guest with a non-standard MAC would fail unless you appropriately configured the backend too.