Howdy, just learning here. I have a PVE lab running on ESXi and I am wondering how PVE picks which VMware interface to assign its ensXYZ value?
My PVE VM has 6 NICS in VMware. On most installations, the first IF in VMware becomes the first IF in the OS. On PVE, I see something different. I used static MAC in VMware, so :01 is the 1st. and so-on:
It is actually udev that does this. According to Red Hat these are the rules:
Scheme 1: Names incorporating Firmware or BIOS provided index numbers for on-board devices (example: eno1), are applied if that information from the firmware or BIOS is applicable and available, else falling back to scheme 2.
Scheme 2: Names incorporating Firmware or BIOS provided PCI Express hotplug slot index numbers (example: ens1) are applied if that information from the firmware or BIOS is applicable and available, else falling back to scheme 3.
Scheme 3: Names incorporating physical location of the connector of the hardware (example: enp2s0), are applied if applicable, else falling directly back to scheme 5 in all other cases.
Scheme 4: Names incorporating interface's MAC address (example: enx78e7d1ea46da), is not used by default, but is available if the user chooses.
Scheme 5: The traditional unpredictable kernel naming scheme, is used if all other methods fail (example: eth0).
As you can see, you have alternative names that follow the naming conventions. Use ip l to check the links. But this is done so if you (on real hardware) put a different NIC in the same slot, your device names don’t change.
VMWare is kind of weird, for various legacy reasons NICs and other PCIe devices (eg storage) assigned to the guest do not necessarily appear in the order they are defined, I think it starts with the third, through 7th, then does the first 2. It seems someone a long time ago wrote some spaghetti code to make it “work” back in the day for Windows NT, so look at the output of smbios or the ACPI table and don’t be surprised it is encoded in the first few bytes of the PCIe address using UTF-16LE (which is what Windows kernel uses).