In an Ubuntu 18.04 server, I was not able to rename network interfaces through proven config-management-applied systemd-networkd
configuration working on all other servers.
The only difference I see between servers originally set-up by configuration management and this partially hand-petted machine is that the Ubuntu server has been upgraded from at least 14.04, maybe even 12.04.
Investigating
initrd
and comparing with a server that worked, two obvious differences appeared through upgrading Ubuntu:/lib/udev/rules.d/71-biosdevname.rules
This is an old-times relict of renaming network interfaces in Ubuntu. It has to be deleted.
/etc/udev/rules.d/80-net-setup-link.rules
This was set-up shadowing
/lib/udev/rules.d/80-net-setup-link.rules
, which (among others) also applies configuration fromsystemd-networkd
. It contains a message indicating some miss-interpreted setup as VM (actually, this is a bare metal server):This file also has to be deleted.
A final
update-initramfs -u && reboot
results in properly renamed network interfaces.