Creating Custom ESXi Image
So my whitebox ESXi server doesn’t have drivers for ESXi out of the box the following is how I created a custom image with the necessary drivers.
Requirements
- Windows System with Powershell 5.0 or greater
- VMware’s PowerCLI – Install by running to following in an admin powershell windowinstall-module -Name VMware.PowerCLI
Version 11 was that latest at the time of writing. - The offline bundle of the latest ESXi version obtained with ESXi-Customizer Powershell Script found here.
- The VIB containing your driver. VIBs can be found here.
Procedure
Create a folder to work in, in that folder create a folder labeled “Offline”
Get the ESXi 6.7 Offline depot files and put them in the offline folder.
ESXi-Customizer-PS-v2.6.0.ps1 -v67 -outDir .\Offline -ozip
Create a “pkg” folder and put your VIB containing your drivers in here.Next we are going to start working with the image file.
Add-ESXSoftwareDepot .\Offline\ESXi-6.7.0-*-standard.zip
Verify the image was added with:
get-EsxImageProfile
You should only see one entry right now.
Next add each VIB to the software depot.
Add-EsxSoftwareDepot .\pkg\net55-r8168-8.045a-offline_bundle.zip
Next we need to create a new image to work with.
New-EsxImageProfile -CloneProfile ESXi-6.7.0-20190504001-standard -Name ESXi67Custom -vendor "David Trask"
Again you can verify the profile was created by running get-esximageprofile
you should now see two images listed. Most likely you will need to change the Acceptance Level to add in your drivers.
set-EsxImageProfile ESXi67Custom -AcceptanceLevel CommunitySupported
Then you can add your drivers.
Add-EsxSoftwarePackage -ImageProfile ESXi67Custom -SoftwarePackage net55-r8168
I believe you can add multiples at once with comma separation.
export-esxImageProfile -ImageProfile ESXi67Custom -ExportToIso ESXi67_Custom.iso
Optional
Burn the ISO to a flash drive using Rufus found here.