Renaming of pinned nic names

Onkeldata

New Member
Jun 10, 2025
5
0
1
I setup a PVE 9 to include in my Cluster. It pins the NIC names to static names. I didn't pay enough attention, and now my 10g NIC for the storage are nic4 and nic5. I'd like them to have a name like fiber10g1 and fiber10g2
Now, there are lot of "edit by hand" finds, but I'd like to think, there is a mechanic in pve to do this safely? I always can set it up again, but...
 
Hi,

you can use the pve-network-interface-pinning tool: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_using_the_pve_network_interface_pinning_tool

Especially the section on pinning a specific interface should do the trick: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_using_the_pve_network_interface_pinning_tool#:~:text=When pinning a specific interface

For example:
Code:
pve-network-interface-pinning generate --interface nic4 --target-name fiber10g1
Thank you for the fast response. But, this is not renaming the pin, it is the "first" pin.
 
If they are named nic4 and nic5, then they are were already pinned by the installer. It's our default naming scheme.

Afterwards, you just need to remove the old file at /usr/local/lib/systemd/network/50-pmx-<oldname>.link.
 
If they are named nic4 and nic5, then they are were already pinned by the installer. It's our default naming scheme.

Afterwards, you just need to remove the old file at /usr/local/lib/systemd/network/50-pmx-<oldname>.link.
Yes, that's what I tried to communicate. So, the removal of these links is all I need? Then I can pin the names I want? It read in the posts out there like other configuration files had to be edited, too.
 
So, the removal of these links is all I need?
Yes.
- First run pve-network-interface-pinning as shown above
- Then, afterwards, remove the .link for the old interface name under /usr/local/lib/systemd/network/.
- Finally, reboot

The pve-network-interface-pinning takes care of updating all Proxmox-managed configuration files.
If you installed any additional, non-default services on the host that depend on interface name, you of course need to update them manually
 
Yes.
- First run pve-network-interface-pinning as shown above
- Then, afterwards, remove the .link for the old interface name under /usr/local/lib/systemd/network/.
- Finally, reboot

The pve-network-interface-pinning takes care of updating all Proxmox-managed configuration files.
If you installed any additional, non-default services on the host that depend on interface name, you of course need to update them manually
This doesn't work, because pve-network-interface-pinning will not generate if there is a pinned name already. So, I'll have to remove the Links first. Now I'm not very confident in your answer, I'm sorry to say, as your way won't run in the first place.
 
Still not solved, sorry! As I wrote before, I'm stuck at
Code:
root@srvvmhpm2:~# pve-network-interface-pinning generate --interface nic4 --target-name fiber10g1
This will generate name pinning configuration for the interface 'nic4' - continue (y/N)?
y
There already exists a pin for NIC 'nic4' - aborting.

As It looks now, I'll have to clean up by hand the configs, which is nothing new to a linux admin, but still annoying if a tool to set this up already exists.


@SteveITS, thank you for the link to the doku. I'm not quite sure it is updated to this version, but will be happy to change the name to en10g1 and en10g2 if necessary.
 
Yes, renaming is indeed not (yet) support - my bad.

But in the meantime, it should be quite easy to work around if you simply delete the old pinning file first at /usr/local/lib/systemd/network/50-pmx-<oldname>.link, and then run pve-network-interface-pinning generate again.

This will cause the tool to interpret the old name as if it were set by the kernel, and do the all the setup as usual.
 
  • Like
Reactions: UdoB