
Reordering vmhba and vmnic in ESXi Hosts
If you encounter issues with the ordering of vmnic and vmhba in some of your ESXi hosts, such as one host not following the expected order and violating your cluster configuration, you can reorder them to match your desired setup.
Steps to Reorder vmnic and vmhba
Put the Host into Maintenance Mode:
- Evacuate the host.
- Enter maintenance mode.
Start SSH and ESXi Shell Services:
- Enable SSH and ESXi Shell services on the host.
Connect to the Host via SSH:
- Use an SSH client to connect to the ESXi host.
Determine MAC Addresses and Physical Addresses:
- Run the following command to list the MAC addresses and physical addresses of your network
[root@localhost:~] localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias list
The output will look like this:

Change the Order of vmnic and vmhba:
Run the first command to reorder phisical network adapter and run 2nd command to reorder storage adapter, for example, I want to change vmnic0
to vmnic6
and vmhba65
to vmhba67
.
[root@localhost:~]localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type pci --alias <vmnic final order> --bus-address <pci bus address>
[root@localhost:~]localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type logical --alias <vmhba final order> --bus-address <logical bus address>


Reboot the Host:
- Reboot the host to apply the changes.
Verify the Changes:
- After the host comes back online, check the physical adapter or storage adapter to ensure the changes have been applied correctly.


Verify and Exit Maintenance Mode
After making the changes, ensure that the network and storage functionality are working correctly. If everything is functioning as expected, you can safely exit maintenance mode.