I am trying to learn/use the Web Services SDK, but have quite a learning curve ahead of me. I want to use this for ESXi configuration for developing automaton to test our adapters.
Anyway, while I have found a lot of documentation, none of it is answering a basic question (at least for me). Where do I install the SDK? It appears that I need it on the workstation that will run the automation tests. However, does it also need to be installed on the ESXi5.5 host? Are the web service APIs already on the ESXi host? The documentation uses example like this
https://your_host_ip/sdk , but that does not exist. Hence my question as to whether or not I need to install it on the host, or is it built-in to ESXi 5.5?. If so then where is it?
For example, the manual states in Chapter 2: (I am referring to this manual. vSphere Web Services SDK Programming Guide vSphere Web Services SDK 5.5)
"The vSphere API is a language‐neutral Web service that runs on ESX/ESXi and vCenter Server systems."
So, does 'Web service' above mean it is already installed on ESXi 5.5? Or does it need to be installed before using the SDK to develop client applications?
Also, the quote above starts with "The vSphere API is a language‐neutral", yet then the documentation goes off and makes it sound like only Java or C# works with the SDK. I plan on using Python, but my design, not pysphere, or other flavors.
So, in summary, do I need to install anything on either ESXi or a vCenter server in order to use the web-services SDK?
Thanks for any help.
You definitely hit the big points on ramping up on the SDK
So yes, it's language neutral, but since the SDK is so very rich, it is quite large making it difficult to parse with generic SOAP-WSDL libraries at runtime. It also has a couple places where the XML serialization isn't 'standard', such as the ManagedObjectReference (which has a different serialization process than other data objects). You'll likely want to stick with one of the available kits for this reason.
The SDK is available on vCenter and ESXi. It's running by default. So long as the ESXi host isn't in lockdown mode, it will also be accessible by remote clients (on TCP 443). There are some exceptions, such as the sdkTunnel interface (on TCP 80), though you shouldn't have to worry about that unless you're creating an vCenter extension.
The short version: no, you don't need to install anything else on vCenter or ESXi. You will need appropriate client libraries to connect, however. The official libraries (which are documented and supported) are Java, C# and Perl. There is also PowerCLI, which is a more admin-centric way to work with the SDK. It generally wraps some of the core functionality in easier to use functions (cmdlets).
If you are going down the Python route, I'd suggest pyVmomi. It's based on VMware's internal implementation of Python SDK (pretty solid but not officially supported). For example, you can run Python scripts from pyVmomi on the ESXi service console shell and it's SmartConnect function handles using non-password local user authentication. I wouldn't let the unofficial support scare you, it's pretty solid but you may have to convert examples from other languages into Python if you don't find existing community support.
You can get pyVmomi here.
Great. Thank you. I was going crazy trying to figure out how to add the vSphere API to ESXi 5.5. Now I can concentrate on trying to get a client to connect to my ESXi host. Baby steps here, one thing at a time.
I will look at pyVmomi.
No worries, you'll find connecting is pretty simple. Look at the sample folder in the pyVmomi project. You'll probably struggle with the data model next, it's pretty large and depending on your VMware experience may need a bit of ramp up. Once you get going though, you'll find there is a lot of power in the SDK. Up until recently the official VMware client was built on top of it. These days there are more and more hidden data objects that aren't published for the public, but they are mostly new features.
G'luck, feel free to jump back on the communities for a hand when you hit a snag.