Not all ESXi releases, including patch updates are available as an ISO image that can be downloaded. Depending on the type of ESXi release, it will either be available as an ISO and Offline Bundle (zip) format which can downloaded from the ESXi Customer Connect portal or only as an Offline Bundle which must be downloaded from the VMware Patch portal.
I typically see folks forgetting about the VMware Patch portal, which also provides patch updates for the vCenter Server Appliance (VCSA), when they are searching for a new ESXi updates. Let's take a look at an example using the ESXi 7.0 Update 3 release, as you can see from the screenshot below, you can download 7.0 Update 3c, d, f and g from the Customer Connector portal but for 7.0 Update 3e, i, j and k you will need to use the VMware Patch portal.
As mentioned earlier, when downloading ESXi patches from the VMware Patch portal, they are only available in the Offline Bundle format, which might work for most typical patch use cases but in some scenarios, you may actually want it in an ISO format, especially for initial installation.
While you can certainly download the Offline Bundle and then export the image profile to an ISO format, it does take several steps and there are few ways to streamline this for those looking for an easy way to get an ISO image.
UI Method:
If you have vCenter Server 7.0 or later, you can simply use vSphere Lifecycle Manager (vLCM) to create a "dummy" vSphere Cluster and specified the desired ESXi version and then export the image to ISO which you can then download. For more details, please see THIS blog post.
a https://williamlam.com/2022/02/how-to-create-a-customized-esxi-iso-without-vcenter-server.html
CLI Method:
The UI method is great if you already have a vCenter Server running but what if you have no existing infrastructure, well this is where CLI method will come in handy and may even be be faster.
Step 1 - Install the latest release of PowerCLI if you have not already, this is especially important for those interested in ESXi 8.x as there are new changes to creating
Step 2 - Find the build number for the desired ESXi version using VMware KB 2143832. In our example, we will use ESXi 7.0 Update 3i which has build number of 20842708
Step 3 - Run the following command, which can take some time, to list out all available ESXi releases from VMware's online depot and search for the full version string based on the build number retrieved from the prior step.
Get-DepotBaseImages https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
In our example, ESXi 7.0 Update 3i will mapped to version string labeled 7.0.3-0.65.20842708
Step 4 - Finally, we create the desired JSON specification that contains the desired ESXi version and then we use the New-IsoImage cmdlet to generate the ISO image, which we have named ESXi-7.0u3i-20842708.iso
$spec = [ordered] @{ base_image = @{ version = "7.0.3-0.65.20842708" } } $spec | ConvertTo-Json | Set-Content -NoNewline -Path spec.json New-IsoImage -Depots https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -SoftwareSpec spec.json -Destination "ESXi-7.0u3i-20842708.iso"
At this point, you now have an installable ESXi ISO image for the specific ESXi patch release. If you need to add additional VIB/Components, you can refer to THIS blog post for the required commands to incoroprate additional drivers.
Hi William,
interesting information. The cmdlet "Export-EsxImageProfile -ExportToISO" is also still working. Is that considered obsolete now and/or does it have a different result compared to "New-ISOImage"?
- Andreas
It'll continue to work for now but the New-IsoImage is based vSphere Lifecycle Manager (vLCM) which uses software specs (hence the additional param) and going forward, I would expect this to be primary way in creating custom images, which also allow for exporting to different formats including ISO and/or Image Profiles
Thanks.
Have been using "Export-EsxImageProfile -ExportToISO" for many years with no issues.
Running into the following error when trying the command line option:
New-IsoImage: [WinError 10054] An existing connection was forcibly closed by the remote host
Is there any way to generate the softwarespec file from the zip bundle itself?
I mean, short of building the json spec file from scratch in code using get-depotaddons and get-depotbaseimage. Is there perhaps a way to programmatically get the structure of a json spec? something similar to esxcli's createargs capability?
not afaik, since its a fixed schema that you can probably generate it manually if you really want to have the spec up front