Is it possible determine using the esx license info (retreived through the api) if I can make changes using the api?
the licence manager can be accessed via the API. I use SDK to add licences and assign to hosts and vcenter for automation of new green field sites. If you open the API ref guide and search for licence under properties that will give you an idea of all the things you can do with licensing via the api.
Thanks for the advice but I am not looking to make changes to the licensing via the API I want to know if the licensing has anything in it that lets you know if you can make changes to the esx machine via the API.
I don't think licensing has got anything to do with what you can do to host via the API. If an API supports direct action on a host then that's all you need. I use sdk to connect direct to hosts to set name, welcome message, ip adress, DNS etc. do need to check licence has not run out though. Apologies if not understanding the question.
Hi esxwork,
Yes, you can determine whether you have read/write access to the vSphere API by looking at the license information. The only version of the ESXi that does not allow write access to the vSphere API is the free vSphere Hypervisor which you can easily determine by looking at the license name property using the LicenseManager - http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.LicenseMan...
The string for a vSphere 4.x host will look like
vSphere 4 Hypervisor
The string for a vSphere 5.0 host will look like
VMware vSphere 5 Hypervisor
If you find a host that has that as it's "name" property, then it is the free vSphere Hypervisor which does not provide write access to the vSphere API.
Thanks for the tip but I could not figure out how to get the functions with LicenseManager working using SOAP and php. However I realized the information gets dumped out when you do a 'QueryHostConnectionInfo' on the machine. Turns out I had the access to the information I wanted all along but forgot about it because 'QueryHostConnectionInfo' returns lots of information that I usually just ignore.
