harvester icon indicating copy to clipboard operation
harvester copied to clipboard

[QUESTION]How to permanently change the name of the NIC in Harvester node?

Open braveantony opened this issue 6 months ago • 2 comments

I have 3 Harvester nodes, each with 2 additional NICs that I want to use to build a Cluster network. The name of the NIC for each host is as follows:

  • hvx01: ens35, ens36
  • hvx02: ens34, ens35
  • hvx03: ens35, ens36

and when Create Cluster Network Config with balance-alb Mode, I can only select ens35 card, not ens34 or ens36. image

So I try to use the following way to rename ens34 to ens36,

$ vi /oem/90_custom.yaml
stages:
    initramfs:
          files:
           # Append the following line
            - path: /etc/udev/rules.d/70-persistent-net.rules
              permissions: 384
              owner: 0
              group: 0
              content: |
                ATTR{address}=="<mac address>", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="ens36"
              encoding: ""
              ownerstring: ""

After Reboot the node, I get the following messenge

$ journalctl -u systemd-udevd.service
Aug 23 12:47:32 hvx02 (udev-worker)[1538]: Using default interface naming scheme 'sle15-sp4'.
...
Aug 23 12:47:32 hvx02 (udev-worker)[1536]: ens34: Network interface 'ens34' is already up, refusing to rename to 'ens36'.
...

Does anyone have a good solution?

braveantony avatar Aug 23 '24 13:08 braveantony