adamant-kite-43734
02/14/2024, 10:26 PMsticky-tailor-45974
02/15/2024, 8:32 AMinitramfs
stage to actually rename the interface under some criteria. This could be done by simply dropping the udev rule file in the expected location.
I am not familiar enough with Harvester is actually guide you properly on how to include additional config files within the host.
The yip configuration could something in the spirit of:
name: "Nic rename"
stages:
initramfs:
- name: "Nic rename"
files:
- path: /etc/udev/rules.d/70-persistent-custom-net.rules
content: |
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
permissions: 0600
This is just a trivial dump rule that renames any network interface to lan0
bland-article-62755
02/15/2024, 3:30 PM- ip link set dev enp175s0f1 down
- ip link set dev enp175s0f1 name lan100
- ip link set dev lan100 up
Seems like that works? Does this seem sane?blue-kitchen-51801
02/16/2024, 9:22 AM(udev-worker)[1608]: enp5s0f0: Network interface 'enp5s0f0' is already up, refusing to rename to 'ens1f0'.
bland-article-62755
02/16/2024, 2:49 PMip link set dev enp5s0f0 down
bland-article-62755
02/16/2024, 2:50 PMbland-article-62755
02/16/2024, 2:52 PMsticky-tailor-45974
02/16/2024, 2:56 PMrd.neednet=1
kernel param) I guess then you need to set the link down before any change as @bland-article-62755 suggests