Ever had an accident when out and about? Trip or fall at work? Or a problem with your vmnics on your ESXi server not ordering correctly?
Well I can help with the latter!
Anyone that has built enough ESXi servers has come across this. Particulary if the hardware varies, however most annoyingly when it's exactly the same server and expansion cards and we want everything to be named "exactly" the same (because us techies can very picky).
Anyway to the point as you want a fix so you can get on with everything else you need to do right?!
This happens because ESXi assigns the vmnic number (e.g. vmnic0, vmnic1.. etc) as the physical adaptors are detected. While this should happen in an order that makes sense (based on PCI bus numbering and/or MAC address increments) this does not always happen. Now this happens alot less than it used back when I was doing ESX 3.x installs, it still occurs with ESXi 5.1!
1. Put your host in maintenance mode (VMs will need to be powered off or vMotioned to other hosts if in a cluster)
2. SSH to the ESXi server and login as "root".
Note: You may need to start the SSH service (under Configuration --> Security Profile)
3. Edit the hosts config file:
vi /etc/vmware/esx.conf
4. Locate the section where the devices are mapped to names:
e.g. /device/000:003:00:0/vmkname = "vmnic0"
5. Make your required name changed so your vmnics are labelled as you require.
6. Don't forget to save!
:wq!
7. Reboot the ESXi server
reboot
8. Exit maintenance mode
9. Power on and/or vMotion the VMs back (if DRS is not enabled).
10. Job done!
Share this blog post on social media:
TweetAll advice, installation/configuration how to guides, troubleshooting and other information on this website are provided as-is with no warranty or guarantee. Whilst the information provided is correct to the best of my knowledge, I am not reponsible for any issues that may arise using this information, and you do so at your own risk. As always before performing anything; check, double check, test and always ensure you have a backup.