Object Model of VMware vSphere API: A Big Picture in 2 Minutes
When I start to use a new API/SDK, I always look for the object model diagram before digging into the API Reference. With that, I can have a good overview of the API, from the concepts to the structure. This can save a lot of time.
Unfortunately, we don’t find such a object model diagram in any official document. The following is the UML diagram from my book VMware VI and vSphere SDK.
The UML diagram can be inferred from VI SDK API Reference. Please note that there is NOT a managed object type called ManagedObject in the API Reference. This is a type I add to make the object model complete. Given the limited size, I only show the names of the types, not properties and methods.
To better group these managed object types, I use different colors. On the right most side of the diagram are the ServiceInstance class and various “manager” classes like AuthorizationManager. From the ServiceInstance, you can get any object of these types with single call in VI Java API, for example getAuthorizationManager().
In the middle of left side, you can find ManagedEntity class and its sub-classes like HostSystem, VirtualMachine. These types represent all the items you could find in the inventory tree from VI Clients. They are the most important managed objects in the whole model, and all tagged with orange color except the HostSystem.
The HostSystem is very much like ServiceInstance in that it has many “System” or “Manager” types closely attached to it, for example, HostDatastoreSystem. You can get hold of these objects with a single method call from a HostSystem object in vSphere(VI) Java API. For this reason, both HostSystem and all the attached classes are tagged the same color.
The diagram shows the object model of VI SDK 2.5. vSphere 4 adds 20+ managed object types. It also changes a few inheritance relationships. Network, for example, becomes a subtype of ManagedEntity in vSphere. Other than these changes, the overall structure and the way how it works are the same.
Author: Steve Jin is the author of VMware VI and vSphere SDK (Prentice Hall), creator of VMware vSphere Java API. For future articles, please subscribe to Email or RSS, and follow on Twitter.


Good diagram, Steve!
Thanks Dmitri!
More diagrams to come. Please stay tuned.
-Steve
Isn’t this way too complicated for a simple model of Datacenter-Host-VM model ? I found it difficult to understand. IMO It overlays important things with not-so-important ones that makes things difficult.
The vSphere API is indeed complicated, and that is why vCloud API was designed. The vSphere API is like “under the hook” API and the vCloud API is like “driver seat” API. Both are needed depending on what you want to achieve. I think you vCloud API is what you like. I will blog about it later. Please stay tuned.
[...] My previous blog introduced the object model of the vSphere API. The UML diagram there shows how different managed object types are structured in the inheritance hierarchy. [...]
[...] constructed under the hook. That is why system administrators want to learn about API, especially object model, even though not developing [...]