lxctl/lxctl — pull request #8 by nickandrew (2012-06-04 16:32:39+00:00)
Title: Macfix

Hi, I started using lxctl today, with the version packaged with ubuntu 12.04.

I found the MAC address calculation was unusable as the first byte was "01" which the kernel won't permit. So I checked your latest github sources and found this has been fixed so it's now "FC" to prefix and every MAC addr ending with "01".

Fixing the least significant byte of the MAC address doesn't make any sense so I fixed it again; the first 3 bytes are now assigned at random the first time lxctl is used, and retained for subsequent runs. The prefix complies with IEEE/kernel rules on MAC addresses. The last 3 bytes are computed from the SHA1 hash of the container name, as before.