Friday, 6 May 2011

Vsphere ESX NIC numbering

VMware had an issue with the nics port numbering. If you have on board nics, and some PCIe nics, the numbering is not correct. With HP server and Broadband and Intel adapter it happens.


It pretty much assigns them in whatever order it finds them - you can see this article ( for a rundown on the process. Now if you are really dead set on changing them it can be done. You would have to:


You can change the numbering by changing the esx.conf


1. go into the console (tech support mode on ESXi)

2. cd /etc/vmware

3. backup your esx.conf

                eg. cp esx.conf esx.conf.bak

4. edit esx.conf and look for your vmnic entries.. will look something like

     /device/000:001:00.0/vmkname = "vmnic0"

     /device/000:001:00.1/vmkname = "vmnic1"

     /device/000:002:00.0/vmkname = "vmnic2"

     /device/000:002:00.1/vmkname = "vmnic3"

5. Order as desired by editing the string vmnicX

6. Look for mac address assignment to vmnicX and change them accordingly, change the lines for the mac "xx:xx:xx:xx:xx:xx" and virtualmac "yy:yy:yy:yy:yy:yy" to be consistent. Don't change just the "vmnicX", leave everything in the same place.


                /net/pnic/child[000X]/mac/ = "xx:xx:xx:xx:xx:xx"

                /net/pnic/child[000X]/name/ = "vmnicX"

                /net/pnic/child[000X]/virtualmac/ = "yy:yy:yy:yy:yy:yy"


7. Save the edited file and reboot


You may have to readjust your nic bindings in networking in the Virtual Center when done.


For many implementations, the numbering is not an issue, but for a correct design (using nic port to a specific Switch port) and validate the cabling the right numbering is important. The use of host profiles is standardized, including the nic names, which makes things easier to maintain with less efforts.


Example: We use vmnic0 and vmnic5 for service console and vmkernel for iscsi, and vmnic1 and vmnic4 for Virtual Machines Data, if the numbering is not correct, you can use the same nic/port for High Availability, if you have a nic problem, both nics/ports can be the some physical port, and you have no vmkernel, or Service Console


This is just an example what can happen if you have your infrastructure very well documented, and the correct design for High Availability on all connections.


I hope It is useful for you as it was for me !

1 comment:

  1. it was very helpful and it works.
    Thanks a lot.