Renaming VMNICs on ESXi
search cancel

Renaming VMNICs on ESXi

book

Article ID: 409368

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

ESXi users frequently seek to rename or modify the default vmnic# aliases that correlate with physical Network Interface Card (NIC) MAC addresses on their hosts. The default enumeration can sometimes be non-intuitive, leading to a desire for custom naming.

Environment

VMware ESXi 6.x
VMware ESXi 7.x
VMware ESXi 8.x

Cause

VMware ESXi determines vmnic# aliases based on hardware addressing information provided by the host's firmware. There are currently no direct, supported workflows within the vSphere environment to manually change these assigned VMNIC aliases. The numbering is primarily hardware-driven and largely static once assigned under normal operating conditions.

Resolution

There aren't any current workflows to change the VMNIC# alias assignment directly from your vSphere environment. ESXi enumerates VMNIC aliases based on hardware addressing information that is fed to the hypervisor from the host's firmware.

Below are details on how VMNIC# aliasing is determined, but for more information please see How VMware ESXi determines the order in which names are assigned to devices 

 

 

New installation/autodeploy
In the case of a new installation or autodeploy with no host profile, the device manager will query the machine's firmware to get location information for each port, generally including which ports are onboard, which are in pluggable slots, and how those ports and slots are numbered on the system's case. ESXi then assigns aliases to the ports from 0 upwards in order of onboard ports first, then ports not described by the firmware, then ports in pluggable slots.

If a system has:

  • Two onboard network ports
  • One single-port NIC in slot #3
  • One dual-port NIC in slot#5
  • Then devices names should be assigned as:
Physical Port Device Alias
Onboard port 1 vmnic0
Onboard port 2 vmnic1
Slot #3 port 1 vmnic2
Slot #5 port 1 vmnic3
Slot #5 port 2 vmnic4

 

Hardware changes and device aliases
Changes to the hardware configuration are subject to these rules:

  • When cards are added or removed after the initial installation, ports remaining retain their assigned names.
  • ESXi assigns a new port to the first available unassigned alias for its type.
  • The alias for a removed port becomes available.
  • A replaced port may be seen either as being the same as the original port or as a removal followed by an addition. In the former case, the new port has the same alias. In the later case, it may acquire the same alias. This occurs if the old alias is the lowest-numbered free alias.
  • In the event the replacement device has more ports, these will be assigned the next available unassigned alias(es) of its type. A replacement device with fewer ports will release the unused aliases for re-assignment.

 

ESXi Upgrades
Upgrades from one release of ESXi to the next, including autodeploy configurations, do not change the aliases previously assigned to the system's ports. This includes upgrading from prior releases to ESXi 5.5 and later.

Note: In rare cases, aliases can change across an ESXi upgrade or patch installation, due to ESXi parsing the firmware device location information. For example, in ESXi, NICs are named in vmnicN format, where N is a number ranging from 0 upward, where other vendors may name them different: ESXi vmnic order changed after adding more vNICs in UCS Service Profile.
If you need to update/change the device alias mapping for vmnicN, please follow the procedure under "Changing the names assigned by the ESXi host" in knowledge article: How VMware ESXi determines the order in which names are assigned to the devices.

Additional Information

New Installation / Autodeploy (without Host Profile)

Upon a fresh installation or Autodeploy without a host profile, ESXi assigns aliases from vmnic0 upwards based on the following hierarchy:

  1. Onboard Ports First: These are typically enumerated first.
  2. Ports Not Described by Firmware: If any.
  3. Ports in Pluggable Slots: These are enumerated last.

Example Scenario:
If a system has:

  • Two onboard network ports
  • One single-port NIC in slot #3
  • One dual-port NIC in slot #5

The device aliases would typically be assigned as follows:

Physical Port Location Device Alias
Onboard port 1 vmnic0
Onboard port 2 vmnic1
Slot #3 port 1 vmnic2
Slot #5 port 1 vmnic3
Slot #5 port 2 vmnic4

B. Hardware Changes and Device Aliases

When network cards are added or removed after the initial ESXi installation, the following rules apply:

  • Retained Aliases: Existing ports that remain in the system typically retain their originally assigned vmnic# aliases.
  • New Port Assignment: ESXi assigns a new port the first available (lowest-numbered) unassigned alias of its type.
  • Removed Port Alias: The alias of a removed port becomes available for re-assignment.
  • Replaced Port:
    • If a replaced port is seen as the same as the original (e.g., identical hardware signature), it may retain the same alias.
    • If it's seen as a removal followed by an addition, it might acquire the same alias if that alias is the lowest-numbered free alias.
  • Replacement with More Ports: If a replacement device has more ports than the original, the additional ports will be assigned the next available unassigned aliases.
  • Replacement with Fewer Ports: If a replacement device has fewer ports, the unused aliases (those associated with the now non-existent ports) will be released and become available for future assignment.

C. ESXi Upgrades

Upgrades from one ESXi release to another, including Autodeploy configurations, generally do not change the aliases previously assigned to the system's ports. This includes upgrades from prior releases to ESXi 5.5 and later.

Important Note: In rare instances, aliases can change across an ESXi upgrade or patch installation. This can occur due to ESXi parsing firmware device location information differently, or changes in how vendors present hardware to the hypervisor (e.g., changes in UCS Service Profiles). If you encounter a situation where vmnic aliases have unexpectedly changed, further investigation into the specific firmware and ESXi version changes is recommended.

5. Additional Information

  • For more detailed information on how ESXi determines the order of device names, refer to the official VMware documentation: "How VMware ESXi determines the order in which names are assigned to devices."
  • If a changed alias needs correction (e.g., due to an upgrade anomaly), specific procedures for "Changing the names assigned by the ESXi host" (which typically involve advanced configuration or recreating networking) would need to be followed. (Note: The specific steps for changing names are not detailed in this particular article snippet, but are referenced as a potential follow-up if an alias is incorrect).