How to build custom ESXi installation image
Sometimes it might happen that default installation image do not contain all necessary software packages you would like to install directly with the ESXi server itself.
There are several use-cases for using custom ESXi installation image. Either you are using some specific drivers that are not included in the base installation itself and you can’t even install ESXi server or you would like to include some additional software like some monitoring agents.
You can do lot of those tasks as a post-installation procedure, but I have seen lot of troubles with that. People do not follow the installation procedures and then your environment might not be fully compliant with your desired baseline.
For example, in one project we had to deploy specific VIB packages that altered firewall settings. At the beginning we did that as a post-installation step, but some misconfigurations ware made. Then we have decided to include those VIB directly to our golden installation image that was used for deployment of new ESXi servers.
Another example, but this time related to hardware. Once I have tried to install ESXi to brand new server with Intel Xeon D1520, but the installation failed, because NIC card is actually part of the SoC, not dedicated card and no drivers ware bundled in the installation file.
So, as you can see there are several reasons why to build your custom installation image. Please keep in mind that if you are looking just for drivers and you are using branded server, some of the vendors already did that for you. Have a look at OEM Customized Installer CDs
So, what if no existing installation image work for you? Well, you would need to build your own.
For that you will need Windows based PC with PowerCli installed. There is PowerCli for MAC as well, but that version contains only subpart of functionality and unfortunately routines for building installation images are note presented.
First step will be to download base offline bundle of your desired ESXi version.
Second step will be obtaining your software packages. Either VIB itself or whole ZIP file with metadata etc.
Then we will add those packages into our inventory using Add-EsxSoftwareDepot
Once the required software is in the inventory we will create new image profile
New-EsxImageProfile -CloneProfile ESXi-6.5.0-4564106-standard -Name MyNewImage -vendor "MartinGavanda.com"
To get the name of the profile we want to clone from can be obtained by
get-esximageprofile | select name
Now we will add our custom driver
Add-EsxSoftwarePackage -ImageProfile MyNewImage -SoftwarePackage net-ixgbe
And again, name of our software package can be obtained by
Get-EsxSoftwarePackage -Vendor XXX
And finally let’s create the ISO file
Export-EsxImageProfile -ImageProfile MyNewImage -ExportToIso myimage.iso
And that’s it. Your new ISO installation image is ready for use including your custom driver.
You can also have a look at one of my YouTube videos which is part of bigger Vmware vSphere related course where I will show you step by step how to build such image.
Feel free to check my Vmware vSphere course on Udemy as well!
How to build custom ESXi image