SLES Virtual Machine on VMWare with 3 or more NICs does not keep the same NIC order
This document (7021961) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Server for SAP Applications 12
Situation
vSphere adapter | SLES name | (bus, function, device) |
---|---|---|
vSphere first adapter | eth0 | (0, 5, 0) |
vSphere fourth adapter | eth1 | (0, 6, 0) |
vSphere seventh adapter | eth2 | (0, 7, 0) |
vSphere nineth adapter | eth3 | (0, 8, 0) |
vSphere second adapter | eth4 | (1, 5, 0) |
vSphere fifth adapter | eth5 | (1, 6, 0) |
vSphere eight adapter | eth6 | (1, 7, 0) |
vSphere tenth adapter | eth7 | (1, 8, 0) |
vSphere third adapter | eth8 | (2, 5, 0) |
vSphere sixth adapter | eth9 | (2, 6, 0) |
vSphere assigns slots to devices following the order function, bus, device while SUSE assigns NIC names following the order bus, function, device
Resolution
The labels have values such as Ethernet0, Ethernet1, etc which the ESX Hypervisor uses to point at the correct interface; in this way, a "one to one" connection was created without using PCI-Paths, MAC addressses or similar. This rules can be used for all your ESX based virtual machines, if you ever will have more than 10 interfaces just extend the rules.
Example of udev rule: /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet0", NAME="eth0" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet1", NAME="eth1" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet2", NAME="eth2" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet3", NAME="eth3" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet4", NAME="eth4" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet5", NAME="eth5" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet6", NAME="eth6" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet7", NAME="eth7" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet8", NAME="eth8" SUBSYSTEM=="net", ACTION=="add", ATTRS{label}=="Ethernet9", NAME="eth9"
Another alternative would be to create custom udev rules using the MAC addresses for each nic.
Example of udev rule: /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", ATTRS{address}=="00:00:00:00:00:01", NAME="eth0" SUBSYSTEM=="net", ACTION=="add", ATTRS{address}=="00:00:00:00:00:02", NAME="eth1" SUBSYSTEM=="net", ACTION=="add", ATTRS{address}=="00:00:00:00:00:03", NAME="eth2"
Cause
Refer to VMWare Official documentation: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2047927
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7021961
- Creation Date: 03-Oct-2017
- Modified Date:28-Jun-2023
-
- SUSE Linux Enterprise Server
- SUSE Linux Enterprise Server for SAP Applications
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com