Out of many reasons, I need VMware ESXi version information in a format that can be reused in scripts. I maintain a manual list since a couple of years but this list can't be used for automation purposes. VMware does not provide this information in the required format, so I created my own database which is now also available as JSON file.

I've also written a small script to demonstrate what this information can be used for.

JSON Description

Some attributes might not be self-explaining. This is how I build the JSON:

{ "data": { "esxiReleases": [ { "build": "[ESXi Build Number]", "friendlyName": "[Name used at https://kb.vmware.com/kb/1014508]", "imageProfile": "[Image Profile to update to this Build]", "minorRelease": "[5.1, 5.5, 5.0]", "patchRelease": "[Name of the Patch to this Build]", "releaseDate": "[Release Date YYYY-MM-DD]", "releaseFullName": "[API Name (vmware -v)]", "releaseLevel": "[Release Level (vmware -l)]", "updateRelease": "[Release Level used in HCL (eg. ESXi 5.1)]" }, [...] ] }, "timestamp": [JSON file creation timestamp], "totalCount": [Number of entries] }

JSON File



The JSON file is automatically updated when new releases are available. Feel free to use the link in your own scripts. I try to keep the link and format active. If you have questions or need any further information, please comment or contact me.

Please let me known if you are using this file in any automated process. You don't have to, but when I known that someone is using it, its more unlikely that I change the format or link.

PowerCLI Script Example

To demonstrate what these information can be used for, I've created a little script that compares the ESXi Build repository in my JSON file to all ESXi Hosts connected to your vCenter Server and displays the following information:

Current Build Number (Easy, available with Get-VMHost |select Build)

(Easy, available with Get-VMHost |select Build) Release Level (eg. 5.5, 5.5 U1 or 5.5 U2. The release level changes after updates, not after patches. This information is required for HCL checks for example. It's not so easy to get this information in scripts. The script compares the Build against my repository.)

(eg. 5.5, 5.5 U1 or 5.5 U2. The release level changes after updates, not after patches. This information is required for HCL checks for example. It's not so easy to get this information in scripts. The script compares the Build against my repository.) Patch Level (eg. ESXi 6.0 Express Patch 2 - Patches can be sub-versions of updates.)

(eg. ESXi 6.0 Express Patch 2 - Patches can be sub-versions of updates.) Release Date (Release date of the version that is running on your Host - How old is your ESXi?)

(Release date of the version that is running on your Host - How old is your ESXi?) Latest Verison Check (Are Updates available?)

check_esxi_version_with_json.ps1

$esxiReleases = Invoke-WebRequest -Uri http://www.virten.net/repo/esxiReleases.json | ConvertFrom-Json $vmHosts = Get-VMHost Foreach ($vmHost in $vmHosts) { $buildFound = $false Write-Host "ESXi Host $($vmHost.Name) is running on Build $($vmHost.Build)" Foreach ($release in $esxiReleases.data.esxiReleases) { If ($vmHost.Build -eq $release.Build) { Write-Host " - Release Level: $($release.releaseLevel)" Write-Host " - Patch Level: $($release.friendlyName)" Write-Host " - Release Date: $($release.releaseDate)" $minorRelease = $($release.minorRelease) $buildFound = $true Foreach ($rel in $esxiReleases.data.esxiReleases) { If ($minorRelease -eq $rel.minorRelease) { $latestBuild = $rel.build $latestPatch = $rel.friendlyName break } } if($latestBuild -eq $vmHost.Build) { Write-Host " - $($vmHost.Name) is running the latest version!" -ForegroundColor Green } else { Write-Host " - $($vmHost.Name) update available: $($latestPatch) ($($latestBuild))" -ForegroundColor Red } } } If (-Not $buildFound){ Write-Host " - Build $($vmHost.Build) not found in database!" -ForegroundColor Red } }

The script is available on Github.