Two weeks ago I was presented with a problem regarding the use of drivers that were not part of the standard ESXi ISO. I started looking into it and discovered there are two main solutions for a problem like this.
- Installing drivers during the installation
- Injecting drivers into the ISO
The ESXi ISO image, VMware-VMvisor-Installer-versionnumber-buildnumber.x8664.iso, which includes the isolinux.cfg file; Syslinux package; Procedure. If your USB flash drive is not detected as /dev/sdb, or you are not sure how your USB flash drive is detected, determine how it is detected. How to Install VMware ESXi 6.7U2 VMware vSphere Hypervisor ESXi 6.7U2 Setup SYSNETTECH Solutions Article Read More ⬇️ S U B S. The result can be similar to the following message. Disk /dev/sdb: 2004 MB, bytes 255 heads, 63 sectors/track, 243 cylinders Units = cylinders of 16065. 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 2 c W95 FAT32 (LBA). Burn the VMware ESXi ISO image to a CD. Insert the CD into the server and make sure that the server is set to boot to CDROM in the bios. Once the CD boots you will be presented with the VMware ESXi boot menu. Select ESXi Installer and press enter. Many VMware vSphere Hypervisor 6.0 installations fail due to corrupt downloads. Installing VMware vSphere Hypervisor 6.0 (ESXi 6.0) Write (Burn) the VMware-VMvisor-Installer-6.0.0-21592 03.x8664. Iso downloaded in Step 1, to a blank CDROM, using your favourite CD.
Both solutions have it's advantage and disadvantage but I guess the main argument why I prefer to install drivers during the installation versus injecting them into the ISO is flexibility and support. When a new driver is released I want to be able to change the driver bundle instantly without the need to repackage the ISO and I want the installation mechanism to be fully supported. However there are always corner cases where it might be required to inject the driver into the ISO. In this article we will describe both methods. I have used the following articles and documents to create this article:
Installing drivers during the installation
The steps required to install drivers during a scripted installation are straight forward. First the driver package needs to be downloaded and preferably hosted on an internal website. I would recommend using the same location as were the ks.cfg is stored for your scripted install. (If http based of course.)
With ESXi there are two sections where you can define post installation actions. These sections are %post and %firstboot. The difference between these two is that all actions defined in %post will run before the Installer reboots the host where all actions defined in %firstboot will run during the first boot. In the case of %firstboot this is done by a script located in /etc/vmware/init/init.d/ with a prefix of 999, which means it is the last script to be executed during boot.
Depending on the driver that needs to be installed you will either need to use the %post or the %firstboot section. The %post section is mostly used in the case where a network driver needs to be downloaded before the restart, see my article on yellow-bricks.com for an example. In most cases however placing all commands in %firstboot should suffice. Our example will deal with the most common scenario and that is the download and installation of a driver in the %firstboot section.
Edit the install script and include the following in the %firstboot section where <ip-address> needs to be replaced with the ip-address of the web server and <driverbundle> with the name of the actual bundle: