The problem of assigning different name to your VMNIC is not new. Several sources reported NIC enumeration that occurs after applying a BIOS update, resulting a connectivity loss. But there is a way to fix it even if rename VMNIC in VMware ESXi through the UI isn't possible.
In my case it was simple a cosmetic bug, as I did not have problems with connectivity but only with a name. It was my lab issue only on one of my hosts where after installation, one of my Infiniband ports got assigned to VMNIC0 and I did not liked it.
Can't really remember what exactly I did (I think that I tried different versions of the driver, installed and uninstalled the VIB I think) but one of my hosts got that IB add on card assigned with not very sexy name. In fact my dual card infiniband adapter looks like this and there is no way to change it through the UI via the vSphere client or through the web client.
Luckily there was quite a few resources pointing directly to the /etc/vmware/esx.conf file, which allows the modification. Note that reboot of the host is necessary.
You might want to backup before you making any changes, no? Let's see how:
Use this command to backup:
cp /etc/vmware/esx.conf /etc/vmware/esx.conf.old
You can look at your nics through the CLI with this command:
The step-by step for those struggling with putty:
- Open Putty and type “cd /etc/vmware”
- Then type “vi esx.conf”
- scroll further down and untill you see Dev/ids which follow with a =vmnic#
- Type i (for Insert)
- Then you can go the VMnic you wish to modify and use Del or Backspace to modify the name
- Hit “ESC” key
- Type “:wq” to quit.
- Type “reboot” to reboot the host
Here is a quote from the source on how to do it the supported way as changing the esx.conf is not officially supported.
Note: Changing VMNIC names by editing the
esx.conf file is not supported by VMware.
To reorder the numbering on a host which has an undesired VMNIC numbering schema:
- Place the ESXi/ESX host into maintenance mode.
- Remove all VMNICs from the virtual switches except
vmnic0, which is used for management. Make note of which VMNICs are assigned to which vSwitches.
- Shut down the ESXi/ESX host.
- Remove/disable all NICs except
vmnic0. On-board NICs can be disabled in the BIOS. NICs installed in PCI slots should be physically removed. Make note of the slot each one came from.
- Boot the server. At boot time, all removed/disabled VMNICs are removed from the
- Shut down the ESXi/ESX host.
- Add/enable all required NICs.Enable the on-board NICs in the BIOS, and re-insert the PCI bus NICs into the slots they came from.
- Boot the ESXi/ESX host. All VMNICs are assigned per segment, bus, slot, and function ID, and are ordered correctly.
- Assign VMNICs back to the virtual switches they were assigned to before.
- Exit maintenance mode on the ESXi/ESX host.
There is another way to rename VMNIC – through host profiles (if you're on Enterprise Plus). Basically it would consist of creating a host profile from your host which has the VMNICs naming problem and then changing the VMNIC label through the networking configuration section. But I havent's tested it.
An interesting post from Florian Grehl at virten.net showing that the VMNIC numbering has changed on ESXi 5.5. There is a difference between the ESXi 5.1 and 5.5 where you'll see that the port numbers are now the way ESXi numbers the VMNICs. Check out Florian's post here.