Last active
February 11, 2026 14:12
-
-
Save Niktendo/11a478e3cd44c4d48df1b26d7543c84e to your computer and use it in GitHub Desktop.
Custom ISO for integrating custom flings into vSphere image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param( | |
| [string]$ESXIBaseImagePath, | |
| [string[]]$ESXIDriverPaths | |
| ) | |
| $CurrentDir = Get-Location | |
| ##### DO NOT EDIT BEYOND HERE ##### | |
| if((Get-PowerCLIVersion).Major -lt "9") { | |
| Write-Error "This script requires VCF.PowerCLI 9.x or greater`n" | |
| exit | |
| } | |
| Write-Host -Foreground cyan "Processing ESXi Base Image..." | |
| $ESXIBaseImageVersion = (Get-DepotBaseImages -Depot $ESXIBaseImagePath).Version | |
| $ESXICustomIsoSpec = Join-Path -Path $CurrentDir -ChildPath "esx-$ESXIBaseImageVersion-realtek.spec" | |
| $ESXICustomIsoPath = Join-Path -Path $CurrentDir -ChildPath "esx-$ESXIBaseImageVersion-realtek.iso" | |
| $components = [ordered]@{} | |
| foreach ($ESXIDriver in $ESXIDriverPaths) { | |
| Write-Host -Foreground cyan "Processing ESXi Driver $ESXIDriver ..." | |
| $driverComponents = Get-DepotComponents -Depot $ESXIDriver | |
| foreach ($comp in $driverComponents) { | |
| $components[$comp.Name] = $comp.Version | |
| } | |
| } | |
| $spec = [ordered] @{ | |
| base_image = @{ | |
| version = $ESXIBaseImageVersion | |
| } | |
| components = $components | |
| } | |
| $spec | ConvertTo-Json -Depth 10 | Set-Content -NoNewline -Path $ESXICustomIsoSpec | |
| $AllDepots = $ESXIDriverPaths + $ESXIBaseImagePath | |
| Write-Host -Foreground green "`nCreating Custom ESXi ISO and saving to ${ESXICustomIsoPath} ...`n" | |
| New-IsoImage -Depots $AllDepots -SoftwareSpec $ESXICustomIsoSpec -Destination $ESXICustomIsoPath |
Author
Author
py install 3.7
python3 -m pip install --upgrade pip
python3 -m pip install six psutil lxml pyopenssl --upgrade
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
Set-PowerCLIConfiguration -PythonPath C:\Users\NiklasJeske\AppData\Local\Python\bin\python3.7.exe
Add-EsxSoftwareDepot "C:\Users\NiklasJeske\Downloads\VMware-ESXi-9.0.1.0.24957456-depot.zip"
Get-EsxImageProfile
Export-ESXImageProfile -ImageProfile $newProfile -ExportToIso -filepath "VMware-ESXi-9.0.1.0.24957456-depot.iso" -Force
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://williamlam.com/2025/11/realtek-network-driver-for-esxi.html
USBnic: https://support.broadcom.com/group/ecx/productfiles?subFamily=Flings&displayGroup=USB%20Network%20Native%20Driver%20for%20ESXi&release=ESXi%209.0&os=&servicePk=532467&language=EN&freeDownloads=true
Realtek Network Drivers: https://support.broadcom.com/group/ecx/productfiles?subFamily=Flings&displayGroup=Realtek%20Network%20Driver%20for%20ESXi&release=1.101.01&os=&servicePk=&language=EN&freeDownloads=true