Home > vSphere API > Object Model of VMware vSphere API: A Big Picture in 2 Minutes

Object Model of VMware vSphere API: A Big Picture in 2 Minutes

February 27th, 2010 Leave a comment Go to comments

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.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

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.

  1. March 3rd, 2010 at 09:48 | #1

    Good diagram, Steve!

  2. March 3rd, 2010 at 10:25 | #2

    Thanks Dmitri!
    More diagrams to come. Please stay tuned.

  3. Jayadeep Purushothaman
    March 22nd, 2010 at 00:52 | #3

    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.

  4. March 22nd, 2010 at 02:35 | #4

    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.

  5. Damien
    November 17th, 2010 at 11:15 | #5

    Hi Steve,
    First, thanks for the API !
    I don’t really understand how counter works (i already have a look at http://vijava.sf.net/…/samples/perf), do you think you can have a try to make a object model for counter ?

    Kind regards,


  6. November 17th, 2010 at 12:30 | #6

    Hi Damien,

    I am glad you like the API. Have you read the post on performance management in vSphere? http://www.doublecloud.org/2010/03/fundamentals-of-vsphere-performance-management/. Thanks!


  7. Damien
    November 18th, 2010 at 09:32 | #7

    Hi Steve,

    Thanks, i haven’t read this part before (i’m new using the SDK), it’s very intersting.
    I think i’ll have to come back to you some times.



  8. Damien
    January 24th, 2011 at 09:38 | #8

    Hey Steve,
    What is the difference between vim and vim25 ? There some common classes, but not the same behavior.


  9. January 24th, 2011 at 11:22 | #9

    Hi Damien,

    vim and vim25 are the namespace used to version the VI/vSphere SDK. Before VI SDK 2.5, it was vim; every version after, 2.5. With VI Java API, you only need vim25 package which can handle vim namespace as well.


  10. Damien
    January 25th, 2011 at 04:44 | #10

    Thanks Steve.

  11. Damien
    January 25th, 2011 at 05:23 | #11

    I think i was using the wrong sdk till now.. Where could i download last SDK ?
    cause i was using this one : http://sourceforge.net/projects/vijava/files/vijava/VI%20Java%20API%202.1/

  12. January 25th, 2011 at 10:19 | #12

    VI Java API has different versions. The 2.1 you are using is the latest one that support all the VI and vSphere versions. I think you are good.


  13. Damien
    January 26th, 2011 at 04:35 | #13

    Ok. I’ve downloaded and tried the “vijava experimental” from VMware website. What make it “experimental” ? Is it reliable ?

  14. January 26th, 2011 at 10:24 | #14

    Hi Damien,
    As an open source project, VI Java API has never been experimental although we did have one or two experimental features. The one you got from VMware website is totally different thing. For latest vijava API, you can check out http://vijava.sf.net and click the download menu.

  15. Damien
    January 26th, 2011 at 11:37 | #15

    Thnaks Steve, but what would be the difference so ?

  16. January 26th, 2011 at 14:43 | #16

    Damien, I have not used the other SDK, so I cannot comment on that. However, I know of a research by Andrew Kutz at here: http://vijmark.sourceforge.net/


  17. Damien
    January 27th, 2011 at 08:37 | #17

    Thanks Steve ! That’s really interesting.

  18. April 12th, 2011 at 00:30 | #18

    Hi Steve. diagram is very much detailed and self explanatory.
    Also thanks to Damien and Steve for clearing my vim and vim25 concept.

  19. April 12th, 2011 at 00:46 | #19

    You are welcome Pranav! Please feel free to join our first community meetup on May 18th. Registration page will be online soon. Stay tuned.

  20. kim
    January 23rd, 2013 at 00:07 | #20

    can u plz give me class diagram for vsphere smulator?
    or class diagram for mocking vsphere’s VM

  21. January 23rd, 2013 at 00:34 | #21

    Hi Kim, I don’t have class diagram for vSphere simulator. However if you want to develop one, the class diagram should help you.


  22. kim
    January 23rd, 2013 at 03:07 | #22

    thnx for quik reply!!

  1. March 29th, 2010 at 00:03 | #1
  2. August 24th, 2010 at 00:03 | #2
  3. May 5th, 2013 at 11:30 | #3
  4. January 19th, 2016 at 19:26 | #4
  5. November 20th, 2016 at 19:23 | #5