How To – Install drivers in an ESXi Host

If you need to install drivers in an ESXi host, this is how you do it:

Background Information

Recently I was building an ESXi host that used a CNA (Converged Network Adapter) for all network and storage, including for the management network. The specific card I was using was a QLogic QLE8262 CNA.

Normally if you don’t have a NIC driver, the installation will fail as it won’t detect a network card. In this instance however, I did have onboard NICs available, however in my environment these are not being used and hence had not been patched.

Once ESXi was built, I went to configure the Management Network, however there were no connected NICs in the network adapter settings of the Configure Management Network section in the DCUI. There are two solutions to this problem:

  1. Create a custom ESXi image with the correct drivers injected and then rebuild the host using the custom ESXi installer image
  2. Manually install the drivers via the DCUI

I went with option 2, however if you want to know how to create your own ESXi custom image, then I have documented it here >> How To – Create custom VMware ESXi Image

How To – Install drivers in an ESXi host

The following steps document how to install drivers into an ESXi host using the ESXi Shell from the DCUI. I had to do it this way as I didn’t have network access to the host (other than via out-of-band management).

If you have network access to your host, then you could simply do the install via SSH, following a similar process to the steps below but instead of mounting an ISO you could simply copy the drivers to the local datastore or something like that.

Here are the steps I took to resolve my issue:

  1. Enable ESXi Shell
    1. From the DCUI, press F2 to customise the system
    2. Enter your root credentials when prompted
    3. From the menu, select Troubleshooting Options
    4. Enable ESXi Shell
  2. From the DCUI, press Alt+F1 to access the ESXi Shell
  3. Log in with root credentials
  4. Using your out-of-band management attach the ISO that contains the drivers. If you don’t have an ISO file you can create one using the Img Burn software
  5. List all of the CD-ROMs available to ESXi by running
    
    ls /dev/cdrom
    
  6. Write down the results as you will need this later on. Note: You might see multiple results – document all of them. Example: mpx.vmhba33:C0:T0:L0
  7. Mount the ISO so that you can access the driver files, by running the following:
    
    vmkload_mod iso9660
    /sbin/vsish -e set /vmkModules/iso9660/mount mpx.vmhba33:C0:T0:L0
    

    Note: If this doesn’t work try the other CDROMs from step 6

  8. Once successful, your CD-ROM will be mounted with the path of /vmfs/volumes/. In my instance my CD-ROM mount path was /vmfs/volumes/DOWNLOADS
  9. If you are not sure what your CD-ROM label is, you find out by running:
    
    ls /vmfs/volumes/
    
  10. Next we need to install the drivers. To do this you will need to know the exact path to the driver and the name of the driver VIB file
  11. To install a driver in ESXi, run the following command:
    
    esxcli software vib install -v /vmfs/volumes/DOWNLOADS/VMW_ESX_/QLNATIVE.VIB
    
  12. Repeat the above step to install any additional drivers you require
  13. Press Alt+F2 to exit the ESXi Shell
  14. You will now return to the DCUI. From here, reboot the host

And that is pretty much it. Hope this helps.

Thanks
Luca

Comments

  1. Hi Luca, Thanks for this post, 2 days back I was looking for installing network card drivers in my EXSi host, one card was detected while I was having problem with detection of other NIC due to the drivers issue. I follow your blog and I really appreciate your hard work. Keep it up!

    1. Hi Sohail,

      You can use the ls command in linux to list all files and directories in a folder (or in this case your cd-rom drive). This is essentially browsing the cd-rom (or iso) file via command line. Then if your VIB file is stored within a sub-folder you can run ls <folder_name> to browse the contents of the sub-folder. Repeat for all subsequent folders. Alternatively you can navigate into the folder by running cd <folder_name and then running ls to see the contents of the folder.

      Once you determine the path to the VIB and the file name, you can then use it in step 10. If you are unsure of how to use ls, see steps 8 and 9 for examples.

      Hope this helps
      Luca

  2. Very nicely done, thanks!

    Your procedure works correctly under ESXi 6.5 U1.
    I used it to install a whitebox driver for the unsupported RealTek RTL8168 onboard NIC.

    Caveats:
    The CDROM media must be created as type ISO, not UDF or other.
    ESXi is expecting an ISO9660 media type.

    I gave the CD a volume name of VIB so I could easily find it on the console.
    Be sure to do an ls /vmfs/volumes/VIB to see the correct case of your file name.

  3. Nice post, but running the command esxcfg-mpath -l will list the cdrom(s) the system sees and shows the device name. So probably a better option.

    Unfortunately i was unable to create a CD ISO image that was readable though, doing a ls after its mounted would only show folders and throws up errors with files. Gave up trying to get a ISO working, even with rock ridge compatibility enabled.

  4. I am trying to find an ESXi driver for my QLogic QLE8262 CNA. I can’t seem to find it anywhere. Do you still have a copy of your driver or know where I can find the driver?

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.