Because vSphere 5.0 is now released, I can talk about the changes of the API in public. As you may have heard me saying many times, management APIs are the “view” to the product. New features can be exposed via APIs. Understanding the changes in APIs helps you understand the product itself.
The API Reference 5.0 has the first page “New and Changed Managed Object Elements in 5.0” summarizing all the changes. To support vSphere 5.0 in new VIJava API , I’ve gone through all these changes. I will write a separate article on VIJava new release soon.
Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.
New Managed Object Types
Nine new managed object types have been added into 5.0: GuestAuthManager, GuestFileManager, GuestOperationsManager, GuestProcessManager, HostCacheConfigurationManager, HostEsxAgentHostManager, HostImageConfigManager, IscsiManager, StoragePod.
As you can see, the first 4 of them are related guest OS management. The VIX APIs is now integrated into vSphere API, meaning you no longer have limitation on programming languages as imposed by VIX. The GuestOperationsManager is the entry point which you can get from ServiceInstance. From there, you can get GuestAuthManager for authentication, GuestFileManager for guest file management including copying in and out, and GuestProcessManager for guest OS process management.
The latter 4 is closely related to HostSystem. You can get hold of these managed objects from a HostSystem object. HostCacheConfigurationManager provides access to performance tuning features of ESXi using solid state drive based cache. HostEsxAgentHostManager. HostEsxAgentHostManager “configures agent virtual machine resource configuration, such as what network and datastore to use for agent virtual machines.” HostImageConfigManager “configures ESXi software image, including properties such as acceptance level. It is currently designed to be host agent specific.” IscsiManager manages “mapping VMkernel NIC to iSCSI Host Bus Adapter.” (Note: I changed ESX to ESXi here.)
The last one “StoragePod” is a subtype of Folder that “aggregates the storage resources of associated Datastore objects into a single storage resource for use by virtual machines. The storage services such as Storage DRS (Distributed Resource Scheduling), enhance the utility of the storage pod.” StoragePod does not define any additional method but two properties.
New Methods to Existing Managed Object Types
There are 15 existing managed object types that have new methods. The following table from API reference lists all of them.
New Managed Object Properties
Here is the least change with only one new property called “licensableResource” defined in HostSystem. The type for the new property is HostLicensableResourceInfo, which are essentially key/value pairs.
Changed Methods With Additional Parameters
There are 11 methods in 8 managed object types having additional parameters.
As I mentioned in previous blog, vSphere Web Services APIs are wire compatible but not code compatible, meaning your existing application that use any of these 11 methods will need to change for upgrading to vSphere 5.0. The change may as simple as adding a null in place of the new parameters.
To help mitigate the compatibility issue, I’ve kept the old method and route it to the new method with null in place of the new parameters. So if you are using VIJava API, your code does not need to recompile at all.
New Data Objects
There are much more data object types than managed object types in vSphere API. Same is true for new data object type types and new managed object types. When we work with vSphere APIs, the most important part is the managed object types. The data object types are secondary.
Given the fact that there are too many data objects to cover and they are not so important, I will just leave them out in this article. You can always check out here for the information.