VMUG Advantage: Don’t just keep up…stay ahead!

VMUG Advantage: Don’t just keep up…stay ahead! #BreakItDown #VMware #Broadcom

VMUG Advantage: Don’t just keep up…stay ahead!

IT professionals thrive when they’re supported by the right tools, knowledge, and community. That’s exactly what the VMware User Group—or #VMUG—Advantage membership delivers. 🚀 Stay on the cutting edge 🚀 Build your confidence with tailored technical content 🚀 Join a global network of […]


Broadcom Social Media Advocacy

Install vRealize Automation 8.11.2 – Aria…

Install vRealize Automation 8.11.2 – Aria…

This is the first article in a series on Aria Automation. Yes, the title talks about the installation of the 8.11.2 release, when the product was still called vRealize Automation. Why talk about such an old version? Because it often happens that you have to make updates on old infrastructures […]


Broadcom Social Media Advocacy

How to Change vmnic Name on an ESXi Host via Command Line

Renaming or reordering vmnics on an ESXi host can be useful in various scenarios, such as standardizing network configurations or aligning network interface names across multiple hosts. This guide will show you how to achieve this using the ESXi command line.

Listing Current vmnic Aliases

Before making changes, it is essential to check the current vmnic assignments. You can do this with the following command:

localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias list

This command will return a list of all existing vmnic aliases and their corresponding bus addresses.

Bus type  Bus address          Alias
--------  -------------------  -----
pci       m01000300            vmhba0
pci       m01000b00            vmnic0
pci       p0000:00:07.1        vmhba1
pci       m02001300            vmnic1
logical   pci#m01000300#0      vmhba0
logical   pci#p0000:00:07.1#0  vmhba1
logical   pci#p0000:00:07.1#1  vmhba64
logical   pci#m02001300#0      vmnic1
logical   pci#m01000b00#0      vmnic0

When a nic is controlled by a native driver, then there are actually two aliases associated with the device: a pci alias for the pci device and a logical alias for the uplink logical device.

[root@fs-vsan-05:~] localcli --plugin-dir /usr/lib/vmware/esxcli/int deviceInternal alias list | grep vmnic1

pci m02001300 vmnic1
logical pci#m02001300#0 vmnic1

When the logical alias is present, then both the pci alias and logical alias need to be renamed !

Changing a vmnic Name

Make sure you have console access before starting the upcoming steps.

To change the name of a specific vmnic, use the following commands. Replace vmnic5 with the desired new alias and update the bus-address accordingly.

localcli --plugin-dir /usr/lib/vmware/esxcli/int deviceInternal alias store --bus-type pci --alias vmnic5 --bus-address m02001300

localcli --plugin-dir /usr/lib/vmware/esxcli/int deviceInternal alias store --bus-type logical --alias vmnic5 --bus-address pci#m02001300#0

Once the commands have been executed, you need to reboot the ESXi host for the changes to take effect.

reboot

Having Some Fun with vmnic Naming

If you want to experiment and see how ESXi handles long vmnic names, you can try something fun like this:

localcli --plugin-dir /usr/lib/vmware/esxcli/int deviceInternal alias store --bus-type pci --alias vmnic1234567890 --bus-address m02001300

localcli --plugin-dir /usr/lib/vmware/esxcli/int deviceInternal alias store --bus-type logical --alias vmnic1234567890 --bus-address pci#m02001300#0

reboot

While ESXi generally follows a strict naming convention, pushing its limits can be an interesting experiment!

Conclusion

Renaming vmnics in ESXi via the command line is a straightforward process that requires just a few commands and a reboot. Whether you’re restructuring network configurations or just having a bit of fun, these steps will help you modify your ESXi network interfaces with ease.

Related KB: https://knowledge.broadcom.com/external/article/324534/

Easier method to simulate custom ESXi SMBIOS…

Easier method to simulate custom ESXi SMBIOS…

Happy 2025! 🎉 Here is a fun one to kick off the New Year ☺️ Last year, I demonstrated a method for customizing the SMBIOS hardware string using Nested ESXi, but the solution was not perfect and required hacking up a VM ROM file and it was also limited to using the BIOS firmware for […]


Broadcom Social Media Advocacy