Preset the MAC of a New LXD Container

Just a quick tip on how to pre-set the MAC address for a new LXD container. Simply add --config volatile.eth0.hwaddr=<mac> to your lxc launch command. For example:

$ lxc launch ubuntu:x --config volatile.eth0.hwaddr=52:54:00:bc:e4:fe
Creating unespousable-eddy
Starting unespousable-eddy

$ lxc exec unespousable-eddy -- ifconfig eth0 | grep HW
eth0      Link encap:Ethernet  HWaddr 52:54:00:bc:e4:fe

Quick and easy.