Question: Interface renaming with physical networking

Hi forum,

I currently use lxc 3.0.1 and have the options
in my container config. So I am using the host-interface wlo1 and rename it to wlan0
in my container. When I stop the container, the interface is handed back to
the host namespace, but is still named wlan0. Which option do I have to add in my config,
so the container changes the name of the interface back to wlo1 again, when it is being destroyed?

Thanks in advance for helping.


This is a known issue unfortunately.

This got partially fixed for live-detaching here:

However stop-time rename in LXC still exists as an issue. It is on my list to look at though :slight_smile:

If you want it to not change names in the short term the best/only thing to do is to set the .name property to the same as it is on the host, i.e wl01 so its the same inside the container.


I’ve logged the issue here where you can track it if you like.