This PowerShell script creates a custom ESXi ISO and Depot by injecting async drivers into a standard VMware ESXI image. The script supports both Windows and macOS.
This Version 1.0 supports VMware ESXi 9.0 Build 24755229.
Python 3.7.1–3.12 (As per current PowerCLI support, Python 3.12+ is not supported, as VMware PowerCLI doesn't yet support versions beyond 3.12, Support in script will be extended once PowerCLI adds compatibility)
-
ESXi Depot ZIP
Download the ESXi base image (depot.zip) from the VMware website.(Required to create a custom ESXi ISO.) Example:VMware-ESXi-9.0.0.0.24755229-depot.zip
-
Driver ZIP
Download the drivers .zip file from software.cisco.com (for example, Cisco_UCS_Drivers_ESXi.5.4.0b.zip) and from within that file extract the specific drivers .zip file matching the VMware release.
Example:Cisco_UCS_Drivers_ESXi_9.0_24755229.zip
(having all the required async drivers for creating custom image.)
⚠️ PowerShell must be installed via Homebrew.
Install brew if it is not already available in your system using below cli command /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install --cask powershell
-
ESXi Depot ZIP
Download the ESXi base image (depot.zip) from the VMware website.(Required to create a custom ESXi ISO.) Example:VMware-ESXi-9.0.0.0.24755229-depot.zip
-
Driver ZIP
Download the drivers .zip file from software.cisco.com (for example, Cisco_UCS_Drivers_ESXi.5.4.0b.zip) and from within that file extract the specific drivers .zip file matching the VMware release.
Example:Cisco_UCS_Drivers_ESXi_9.0_24755229.zip
(having all the required async drivers for creating custom image.)
- VMware PowerCLI
- Python modules:
six
lxml
psutil
pyOpenSSL
-
Download the script files.(
package_install.ps1
andcross_platform.ps1
) -
Open PowerShell as Administrator.
-
Navigate to the script folder downloaded.
-
Run the below command in powershell to create custom iso: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass; Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; ./package_install.ps1
-
choose Yes, when prompted with "Performing operation?",
-
A graphical form will appear:
- First, select the ESXi depot ZIP which was downloaded from VMware website defined in prerequisite.
- Then, select the Driver.zip defined in prerequsite.
-
The custom ESXi ISO will be created in the same directory, named with the original image name and current timestamp.
Note: If we run the script for the first time it takes approximately 10 minutes to install all the required packages, but subsequent creation will take 1-2 minutes.
-
Open PowerShell with root privileges using below cli command: sudo pwsh
-
Execute the script: ./package_install.ps1
-
A folder picker will appear:
- First, select the ESXi depot ZIP which was downloaded from VMware website defined in prerequisite.
- Then, select the Driver.zip defined in prerequsite.
-
The custom ESXi ISO will be created in the same directory, named with the original image name and current timestamp.
If you encounter permission-related errors during execution, run the following command:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
VMware PowerCLI does not officially support pre-release versions of Python.
To ensure full compatibility and avoid unexpected issues, please use a stable release of Python.
- Pre-release versions (e.g., alpha, beta, release candidate)
- Python versions not listed in official PowerCLI documentation
The script will produce two files:
-
A Cisco Custom ISO Image that can be used to install or upgrade VMware ESXi hosts to VMware ESXi 9 with Cisco-recommended drivers. Once this host is built, its image can be imported into vCenter 9 vLCM to serve as a required reference image for the cluster. This reference image can be exported to JSON to be used by other clusters within the vCenter.
-
A Depot.zip file that can be imported into vCenter 9 vLCM to produce a required reference image for the cluster. This reference image can be exported to JSON to be used by other clusters within the vCenter.