This vSphere SDK for Perl sample script demonstrates the listing of all supported Virtual Hardware Versions (VM Compatibility) for a given vSphere Cluster.
For more details, please visit this blog article: http://blogs.vmware.com/vsphere/?p=8565
Disclaimer: These script are provided for informational/educational purposes only. It should be thoroughly tested before attempting to use in a production environment.
Here is an example of how the script works:
./getSupportedVirtualHardareVersion.pl --server [VCENTER] --username [USER] --cluster [CLUSTER]