vmware-scripts icon indicating copy to clipboard operation
vmware-scripts copied to clipboard

create_custom_esxi_iso.ps1: Incompatible with bundle containing multiple versions

Open jellybean13 opened this issue 2 years ago • 4 comments

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" } }

image image

jellybean13 avatar Mar 31 '22 04:03 jellybean13

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:

  1. Execute "create_custom_esxi_iso.ps1". It ends with errors.
  2. 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" } }
  3. Comment the following codes in "create_custom_esxi_iso.ps1" to disable spec JSON file auto-generation. image
  4. Execute "create_custom_esxi_iso.ps1" again, a custom ISO file will be successfully generated.

jellybean13 avatar Mar 31 '22 07:03 jellybean13

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...

frank1119 avatar Jun 22 '22 16:06 frank1119

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 )

image

any help guys.. appreciated.

eng-rsalha avatar Jul 20 '22 12:07 eng-rsalha

@lamw @jellybean13 @jthat @frank1119

eng-rsalha avatar Jul 20 '22 12:07 eng-rsalha