vmware-scripts
vmware-scripts copied to clipboard
create_custom_esxi_iso.ps1: Incompatible with bundle containing multiple versions
Could not create ISO file with drivers integrated.
Affected version: VMware ESXi 7.0U3d.
spec JSON:
{ "base_image": { "version": [ "7.0.3-0.35.19482537", "7.0.3-0.30.19482531" ] }, "components": { "Net-Community-Driver": "1.2.7.0-1vmw.700.1.0.15843807" } }
After debugging, the problem is that the value of "version" in a spec JSON file is String rather than set. In other words, using a bundle containing multiple versions such as VMware ESXi 7.0U3d ("7.0.3-0.35.19482537", "7.0.3-0.30.19482531") will encounter an error owing to invalid data type.
Workaround method:
- Execute "create_custom_esxi_iso.ps1". It ends with errors.
- Modify spec JSON file. Select a version in this file, and make sure the type of "version" is String.
Example:
{ "base_image": { "version": "7.0.3-0.35.19482537" }, "components": { "Net-Community-Driver": "1.2.7.0-1vmw.700.1.0.15843807" } }
- Comment the following codes in "create_custom_esxi_iso.ps1" to disable spec JSON file auto-generation.
- Execute "create_custom_esxi_iso.ps1" again, a custom ISO file will be successfully generated.
I think replacing
$ESXIBaseImageVersion = (Get-DepotBaseImages -Depot $ESXIBaseImagePath).Version
with
$ESXIBaseImageVersion = (Get-DepotBaseImages -Depot $ESXIBaseImagePath).Version | select -first 1
might be sufficient?
Update: I see somebody else created already a pull request for this issue...
Hello everyone, i used the script and modified the multiple versions error above to be single one as a string under "VMware-ESXi-7.0U3f-20036589-depot.zip" the latest one right now.. but another error message appears: ( New-IsoImage : For "msg" expected type str, but got tuple )
any help guys.. appreciated.
@lamw @jellybean13 @jthat @frank1119