Hi, I'm having an issue upgrading the hardware version of virtual machines.
my $vm = Vim::find_entity_view (view_type => 'VirtualMachine', filter => {'name' => $vm_name});
$vm->UpgradeVM();
Invoking the method UpgradeVM I sometimes get an error saying: Virtual machine compatibility is already up-to-date
I can get the current hardware version checking $vm->config->version, but I don't know if it is the latest available hardware version or not. How can I find out which is the latest hardware version available for a virtual machine before upgrading it?
Thanks in advance.
You can retrieve the list of supported OSes, Virtual Hardware, configurations, capabilities, etc. by using the EnvironmentalBrowser http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.EnvironmentBr...
For vHW version, take a look at the QueryConfigOptionDescriptor() which will return the list of ESXi hosts and the version of vHW it supports. Attached is a screenshot using the vSphere MOB
I'm not sure if there is something you can programmatically derive in the SDK, I think the last time I went looking for this I came up empty.
Usually I create a version table based on something like what's listed in this KB: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100374...
You can retrieve the list of supported OSes, Virtual Hardware, configurations, capabilities, etc. by using the EnvironmentalBrowser http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fvim.EnvironmentBr...
For vHW version, take a look at the QueryConfigOptionDescriptor() which will return the list of ESXi hosts and the version of vHW it supports. Attached is a screenshot using the vSphere MOB
That's great. So maybe a bit of parsing on each available H/W version against the VMX-## to get the highest version number?
Thank you, guys for your answers!!!! QueryConfigOptionDescriptor method works perfectly.
