I've been juggling with containers a lot these days and been bitten quite a few times by the fact that MAC addresses change or stay the same at inconvenient moments so that I end up with conflicts in IP addresses or DNS names.
For me it is really useful if a MAC address stays the same when a new container has the same name. In fact, I implemented a Perl script that uses the API to clone a CT from a template and sets the MAC to an address derived from the container name. That way I can stop the old container with the same name and start the new one within seconds with the new container taking the place of the new one seamlessly.
Perhaps such an feature would be useful in general when implemented as a GUI option.
For me it is really useful if a MAC address stays the same when a new container has the same name. In fact, I implemented a Perl script that uses the API to clone a CT from a template and sets the MAC to an address derived from the container name. That way I can stop the old container with the same name and start the new one within seconds with the new container taking the place of the new one seamlessly.
Perhaps such an feature would be useful in general when implemented as a GUI option.
sub hashed_mac {
my $hostname = shift;
my $mac_nic = substr(md5_hex($hostname), 0, 6);
my $mac = '02:00:00:' . join(':', $mac_nic =~ /(..)/g);
return uc( $mac );
}