Highlighted
Enthusiast
Enthusiast

Lastest supported hardware version

We are automating deployement.

Part of the current process is upgrading vmware tools and upgrading hardware.

Telling vmware tools are updated is simple.

Telling that you have the latest hardware version is not so simple as we don't wan't to hardcode.

Does anybody knows if there is a way to tel what version of virtual hardware is supported on a host? is there a web service api property somewhere containing that.

How does Update Manager knows it must update the hardware....

Plz don't tell me it is hardcoded...

0 Kudos
10 Replies
Highlighted
User Moderator
User Moderator

Afaik that is hardcoded.

But if you want to just upgrade to the latest HW version, you can call the UpgradeVM_Task method without a parameter.

Something like this

$vm = Get-VM -Name MyVM

$vm.ExtensionData.UpgradeVM($null)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Highlighted
Enthusiast
Enthusiast

That is what we do now... but:

-upgrade hardware needs an extra reboot

-the red shown in tasks is not so pretty when you present things to your mgmt (they already tolerate to look at vcenter)

pastedImage_0.png

So i just would like to avoid unnecessary steps... considering templates are 80% of the time up to date (tools & hardware). With checks that should be basic the last four steps are avoided. As well as ridiculous explanation when someone asks... why is there red (because we did our job and maintained the template).

0 Kudos
Highlighted
Enthusiast
Enthusiast

Hi Luc,

You have answered this question in 2013...

Do you know if meanwhile there is a PowerCli cmdlet or a PowerShell method which can do the job?

I need this for Pester tests.

$LatestHardwareVersionAvailable = SomeCodeHereToDetermineTheLatestVersionAvailable

(Get-VM -Name MyVM).HardwareVersion | Should -Be $LatestHardwareVersionAvailable

Same for the latest tools version...

$LatestToolsVersionAvailable = SomeCodeHereToDetermineTheLatestVersionAvailable

(Get-VM -Name MyVM).Version | Should -Be $LatestToolsVersionAvailable

0 Kudos
Highlighted
User Moderator
User Moderator

For the HW version, not that I know of, see a more recent thread on this Re: How to get a list of all supported virtual hardware versions via powerCLI?

Same for the VMware Tools.
And that is in fact more complicated since several Guest OS come with a "Guest Managed" version


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Highlighted
Enthusiast
Enthusiast

Thank you very much!

I have updated the other post with a piece of code doing the job.

Do you have a clue about how to find the latest tools version available on a VM host?

Maybe I can do something similar for the VM tools version... Smiley Happy

0 Kudos
Highlighted
User Moderator
User Moderator

Afaik there is nothing on the ESXi node itself.
But there is this table VMware version-mapping file


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Highlighted
Enthusiast
Enthusiast

Many thanks, Luc Smiley Happy

Below is the code for the maximum available tools version bundled with the ESXi version

However, there is a caveat: according to the VMware page, some build numbers are bundled with 2 different tools versions.

This is the case for example of build number 15160138.

I guess this is an error from VMware...

If you know the right version, I can update the code.

function Get-VMHostToolsCapability {

    param(

        [Parameter(

            Mandatory,

            ValueFromPipeline

        )]

        [VMware.VimAutomation.ViCore.Impl.V1.Inventory.InventoryItemImpl]$VMHost

    )

    process {

        foreach ($VMHostItem in $VMHost) {

            [PSCustomObject]@{

                Name        = $VMHostItem.Name

                SetupTools  = switch ([int]$VMHostItem.ExtensionData.Config.Product.Build) {

                    #Tools matrix can be found here: https://packages.vmware.com/tools/versions

                    16324942 { '11.1.0' }

                    16075168 { '11.0.5' }

                    15843807 { '11.0.5' }

                    15256549 { '11.0.1' }

                    15160138 { '10.3.21' }

                    15160138 { '11.0.1' }

                    14513180 { '10.3.10' }

                    14320388 { '10.3.10' }

                    13932383 { '10.3.10' }

                    13006603 { '10.3.5' }

                    10884925 { '10.3.5' }

                    10764712 { '10.3.2' }

                    10302608 { '10.3.2' }

                    10719132 { '10.2.5' }

                    9239799 { '10.2.5' }

                    10719125 { '10.2.1' }

                    9214924 { '10.2.1' }

                    8294253 { '10.2.1' }

                    8169922 { '10.2.0' }

                    7388607 { '10.1.15' }

                    6921384 { '10.1.10' }

                    5969303 { '10.1.7' }

                    5572656 { '10.1.5' }

                    5146846 { '10.1.0' }

                    4564106 { '10.1.0' }

                    4564106 { '10.0.12' }

                    6480324 { '10.0.9' }

                    5230635 { '10.0.9' }

                    5050593 { '10.0.9' }

                    4722766 { '10.0.9' }

                    4600944 { '10.0.9' }

                    4345813 { '10.0.9' }

                    4192238 { '10.0.9' }

                    4179633 { '10.0.9' }

                    3620759 { '10.0.6' }

                    3566359 { '10.0.0' }

                    3380124 { '10.0.0' }

                    3248547 { '10.0.0' }

                    3568722 { '10.0.0' }

                    3343343 { '10.0.0' }

                    3247720 { '9.10.5' }

                    3029758 { '9.10.5' }

                    2809209 { '9.10.1' }

                    2494585 { '9.10.0' }

                    3116895 { '9.4.15' }

                    3029944 { '9.4.15' }

                    2668677 { '9.4.12' }

                    2638301 { '9.4.11' }

                    2456374 { '9.4.11' }

                    2403361 { '9.4.11' }

                    2143827 { '9.4.10' }

                    2068190 { '9.4.10' }

                    1892794 { '9.4.6' }

                    1881737 { '9.4.5' }

                    1746974 { '9.4.5' }

                    1750340 { '9.4.5' }

                    1623387 { '9.4.5' }

                    1474528 { '9.4.0' }

                    1331820 { '9.4.0' }

                    3872664 { '9.0.17' }

                    3070626 { '9.0.16' }

                    2583090 { '9.0.15' }

                    2323236 { '9.0.15' }

                    2126665 { '9.0.13' }

                    1897911 { '9.0.12' }

                    1900470 { '9.0.11' }

                    1743533 { '9.0.11' }

                    1612806 { '9.0.10' }

                    1483097 { '9.0.10' }

                    1312873 { '9.0.5' }

                    1157734 { '9.0.5' }

                    1117900 { '9.0.5' }

                    1065491 { '9.0.5' }

                    1021289 { '9.0.1' }

                    914609 { '9.0.1' }

                    799733 { '9.0.0' }

                    3982828 { '8.6.17' }

                    3086167 { '8.6.16' }

                    2509828 { '8.6.15' }

                    2312428 { '8.6.14' }

                    1976090 { '8.6.14' }

                    1918656 { '8.6.13' }

                    1851670 { '8.6.13' }

                    1489271 { '8.6.12' }

                    1311175 { '8.6.11' }

                    1254542 { '8.6.11' }

                    1117897 { '8.6.11' }

                    1024429 { '8.6.11' }

                    914586 { '8.6.10' }

                    1739451 { '8.6.13' }

                    821926 { '8.6.5' }

                    768111 { '8.6.5' }

                    623860 { '8.6.5' }

                    515841 { '8.6.0' }

                    474610 { '8.6.0' }

                    469512 { '8.6.0' }

                    Default { 'Unknow ESXi version' }

                }

                NgcViClient = switch ([int]$VMHostItem.ExtensionData.Config.Product.Build) {

                    #Tools matrix can be found here: https://packages.vmware.com/tools/versions

                    16324942 { '11296' }

                    16075168 { '11269' }

                    15843807 { '11269' }

                    15256549 { '11265' }

                    15160138 { '10357' }

                    15160138 { '11265' }

                    14513180 { '10346' }

                    14320388 { '10346' }

                    13932383 { '10346' }

                    13006603 { '10341' }

                    10884925 { '10341' }

                    10764712 { '10338' }

                    10302608 { '10338' }

                    10719132 { '10309' }

                    9239799 { '10309' }

                    10719125 { '10305' }

                    9214924 { '10305' }

                    8294253 { '10305' }

                    8169922 { '10304' }

                    7388607 { '10287' }

                    6921384 { '10282' }

                    5969303 { '10279' }

                    5572656 { '10277' }

                    5146846 { '10272' }

                    4564106 { '10272' }

                    4564106 { '10252' }

                    6480324 { '10249' }

                    5230635 { '10249' }

                    5050593 { '10249' }

                    4722766 { '10249' }

                    4600944 { '10249' }

                    4345813 { '10249' }

                    4192238 { '10249' }

                    4179633 { '10249' }

                    3620759 { '10246' }

                    3566359 { '10240' }

                    3380124 { '10240' }

                    3248547 { '10240' }

                    3568722 { '10240' }

                    3343343 { '10240' }

                    3247720 { '9541' }

                    3029758 { '9541' }

                    2809209 { '9537' }

                    2494585 { '9536' }

                    3116895 { '9359' }

                    3029944 { '9359' }

                    2668677 { '9356' }

                    2638301 { '9355' }

                    2456374 { '9355' }

                    2403361 { '9355' }

                    2143827 { '9354' }

                    2068190 { '9354' }

                    1892794 { '9350' }

                    1881737 { '9349' }

                    1746974 { '9349' }

                    1750340 { '9349' }

                    1623387 { '9349' }

                    1474528 { '9344' }

                    1331820 { '9344' }

                    3872664 { '9233' }

                    3070626 { '9232' }

                    2583090 { '9231' }

                    2323236 { '9231' }

                    2126665 { '9229' }

                    1897911 { '9228' }

                    1900470 { '9227' }

                    1743533 { '9227' }

                    1612806 { '9226' }

                    1483097 { '9226' }

                    1312873 { '9221' }

                    1157734 { '9221' }

                    1117900 { '9221' }

                    1065491 { '9221' }

                    1021289 { '9217' }

                    914609 { '9217' }

                    799733 { '9216' }

                    3982828 { '8401' }

                    3086167 { '8400' }

                    2509828 { '8399' }

                    2312428 { '8398' }

                    1976090 { '8398' }

                    1918656 { '8397' }

                    1851670 { '8397' }

                    1489271 { '8396' }

                    1311175 { '8395' }

                    1254542 { '8395' }

                    1117897 { '8395' }

                    1024429 { '8395' }

                    914586 { '8394' }

                    1739451 { '8397' }

                    821926 { '8389' }

                    768111 { '8389' }

                    623860 { '8389' }

                    515841 { '8384' }

                    474610 { '8384' }

                    469512 { '8384' }

                    Default { 'Unknow ESXi version' }

                }

            }

        }

    }

}

Get-vmhost | Get-VMHostToolsCapability

0 Kudos
Highlighted
User Moderator
User Moderator

No, I'm afraid not.

Also, for Guest Managed VMware Tools this list is most probably not entirely correct.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Highlighted
Enthusiast
Enthusiast

I guess the most accurate way of achieving this it to have a look a the package's version on the VMware host itself.

But I don't know where those packages are...

Maybe we could find them here:

Get-ChildItem -Path 'vmstore:\DatacenterName\ESXi-LOCAL-HostName\'

0 Kudos
Highlighted
User Moderator
User Moderator

The ISO images are located on each ESXi node under /vmimages/tools-isoimages.

You would need to open the ISO itself to detect the actual version.

The 'Guest Managed' VMware Tools come with the Guest OS.

You would need to look inside the Guest OS to determine that version.

Impossible?

No

Complex?

Yes


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos