Similar to my previous article Which Guest OSes Are Supported In vSphere? Using the vSphere API and the Environmental Browser, you can also query for the list of supported Virtual Machine’s virtual hardware versions also known as Virtual Machine Compatibility. This also comes in handy when building a provisioning system or script and you will be able to ask the vSphere platform what virtual hardware version is supported prior to creating your Virtual Machine shell. To do so, you will need to use the QueryConfigOptionDescriptor() method which returns back an array of VirtualMachineConfigOptionDescriptor that contains information about the virtual hardware version and whether the host can support a particular version and whether a version can be upgraded or not.
Disclaimer: These script are provided for informational/educational purposes only. It should be thoroughly tested before attempting to use in a production environment.
To demonstrate the QueryConfigOptionDescriptor method, I have created a simple vSphere SDK for Perl script called getSupportedVirtualHardwareVersion.pl which lists all the supported virtual hardware versions given a vSphere Cluster as input.
Here is the syntax for the script:
<em><strong>./getSupportedVirtualHardwareVersion.pl --server [VCENTER] --username [USERNAME] --cluster [CLUSTER-NAME]</strong></em>
Here is a screenshot of the output from the script:
Get notification of new blog postings and more by following lamw on Twitter: @lamw