Re: reset/change hwaddr/mac in a lxc?
On 1/09/20 11:49 pm, Jim Popovitch wrote:
> On Tue, 2020-09-01 at 17:45 +1200, Richard Hector wrote:
>> On 1/09/20 4:23 am, Jim Popovitch wrote:
>> > Hello!
>> >
>> > lxc-create (Debian Buster) assigns MAC addresses to new containers.
>> > Somehow, 2 new containers (Ubuntu Focal) both got created with the same
>> > MAC/hwaddr. What are my options to change one of them without
>> > hardcoding a hwaddr in a lxc config file?
>>
>> My containers (test system, admittedly stretch on stretch) get new MAC
>> addresses with each boot. Does rebooting (shutdown followed by start)
>> (the container) solve it?
>
> Sadly no. Thanks for suggesting it though.
>
>>
>> It does seem odd that you're getting duplicates though.
On my system, the container-specific configs 'include'
/usr/share/lxc/config/debian.common.conf
(probably ubuntu in your case), which includes
/usr/share/lxc/config/common.conf
Has an explicit MAC address config snuck into one of those, or some
other included file, somehow?
I'd try grepping for the MAC address in places like /usr/share/lxc and
/etc to see if you can figure out where it's coming from or stored.
Maybe /var/cache/lxc/focal as well?
Richard
Reply to: