Proxmox VE – How to change alternative names of the network adapters

Proxmox VE – How to change alternative names of the network adapters

Before shipping servers to a customer, we stage and configure everything in our demo lab first. During that phase, the hardware was connected to a 10GbE switch — that’s what we had available — so when running through the Proxmox installer, I used the alternative names feature to label the NICs accordingly: nic2_10g, nic3_10g.

At the customer site, those same cards were going into Cisco Nexus 25GbE switches. The naming no longer matched the hardware, and having bond-slaves nic2_10g nic3_10g on a 25GbE uplink was just asking for confusion during troubleshooting. Time to clean that up.

Let’s get it sorted.

How Proxmox Names NICs

Proxmox uses a tool called pve-network-interface-pinning which during installation creates .link files in /usr/local/lib/systemd/network/. Each file pins a physical NIC’s MAC address to a specific interface name.

A typical file looks like this:

# setup by the Proxmox installer.
[Match]
MACAddress=30:3e:a7:35:6f:a0
Type=ether

[Link]
Name=nic2_10g

This is standard systemd-networkd persistent naming — Proxmox just uses its own directory instead of /etc/systemd/network/.

The Fix

The process is straightforward: update the .link files, rename them, update /etc/network/interfaces, regenerate initramfs, reboot.

1. Check the current config

cat /usr/local/lib/systemd/network/50-pmx-nic2_10g.link
cat /usr/local/lib/systemd/network/50-pmx-nic3_10g.link

Note the MAC addresses — useful for verification after the rename.

2. Update the Name in the .link files

sed -i 's/Name=nic2_10g/Name=nic2_25g/' /usr/local/lib/systemd/network/50-pmx-nic2_10g.link
sed -i 's/Name=nic3_10g/Name=nic3_25g/' /usr/local/lib/systemd/network/50-pmx-nic3_10g.link

3. Rename the files themselves

mv /usr/local/lib/systemd/network/50-pmx-nic2_10g.link \
   /usr/local/lib/systemd/network/50-pmx-nic2_25g.link

mv /usr/local/lib/systemd/network/50-pmx-nic3_10g.link \
   /usr/local/lib/systemd/network/50-pmx-nic3_25g.link

4. Update /etc/network/interfaces

sed -i 's/nic2_10g/nic2_25g/g; s/nic3_10g/nic3_25g/g' /etc/network/interfaces

5. Verify before rebooting

cat /usr/local/lib/systemd/network/50-pmx-nic2_25g.link
grep nic /etc/network/interfaces

No old names should appear anywhere.

6. Regenerate initramfs

This step is easy to miss and will cause the rename to silently revert after reboot. systemd .link files are applied very early in the boot process — before the full filesystem is available — so they need to be baked into the initramfs:

update-initramfs -u

7. Reboot

reboot

After the restart, confirm the new names are active:

ip link show | grep nic

You should see nic2_25g and nic3_25g instead of the old names.

On a Multi-Node Cluster

If you’re running a Proxmox cluster (typically 3 nodes), do this one node at a time. Reboot, wait for the node to rejoin the cluster, then move on to the next. This keeps quorum intact throughout.

# Check cluster health before and after each reboot
pvecm status

Tested on Proxmox VE 8.x, three-node cluster with 2×25GbE active-backup bond and a dedicated 2×1GbE cluster network.

(Visited 35 times, 1 visits today)

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *