Post by Mantas MikulÄnas Post by Matthias Pfau Post by Mantas MikulÄnas Post by Matthias Pfau
I just tried to rename ipvlan and macvlan devices in a container with
systemd.link. This does not seem to work with debian stretch (host and
Post by Mantas MikulÄnas Post by Matthias Pfau
Is it possible to rename ipvlan and macvlan devices in a container? If
not: Is there another way to define custom interface names?
Post by Mantas MikulÄnas
Containers usually don't have udev (which processes .link files). Manual
renaming should work.
Manual renaming via the ip command works indeed.
However, the udev package is installed in the container and udevadm is
usable. Is there anything else that is needed to enable systemd's .link
Hmm, I'm probably mistaken.
No, you are right. udev is not supported in containers, as /sys is not
virtualized on Linux, and running udev inside contains and on the host
would mean the instances would fight for ownership of the devices.
So yes, Mantas was right: .link files only work on the host, not in
any container. Make sure to just name the interfaces properly when
passing them to the container in the first place.
Lennart Poettering, Red Hat