Author Archives: Steve Jin

Java SE 7 released, finally!

After Java 6.0 released in 2006, it’s been 5 years during which Sun Microsystem was sold to Oracle. Today the 7.0 is finally GAed. It includes quite a few changes including small language changes as well as new and improved APIs.

The language changes are mostly small and may not affect you, for example, the switch statement now works with strings. The new try-with-resource statement, which is similar to using statement in C#, helps you with cleaner code, see the difference shown in the following

Posted in Software Development | Tagged , | 1 Response

Is Compression Supported in vSphere API?

There was recently a question in VMware vSphere Web Service SDK forum regarding gzip compression in vSphere API. I understand where the user came from – some of the SOAP responses could be pretty big. If they can be compressed, performance could be improved and network bandwidth reduced.

The case can be a little tricky. On one hand, compressing big data definitely saves bandwidth; on the other hand,

Posted in vSphere API | Tagged , | Leave a comment

How to Save With New vSphere 5 Licensing Model

Disclaimer: These are my personal thoughts, and strictly mine.

I missed the big launch of vSphere 5 on July 12 because I was having my vacation. When I came back, I found so many discussions around the vSphere 5 licensing change. It’s understandable that people don’t like changes, especially if the changes may have financial impacts.

Technically, the vRAM pooling simplifies the licensing model, as pointed out by Carter Shanklin. Money wise,

Posted in News & Events, Virtualization | Tagged , , | 10 Responses

My Vacation in China

I recently spent two weeks on vacation in China. I’d heard dramatic changes there since my last trip several years ago. My trip definitely confirmed these.

The following are several photos I took while visiting different places:


The Shanghai high speed train station, the end of the world longest high speed railway from Beijing. It started operation on

Posted in Others | Tagged , | 2 Responses

Success Story: Cisco Data Center Network Manager

Today I got an email from Louis Jia who is a Sr. Development manager at Cisco. He told me that the product his team has been working on had been rebranded as Cisco Data Center Network Manager (DCNM) and is formally released. Congratulations to Louis and team!

I don’t normally cover products from vendors, be it an established company or a startup. But this one is different

Posted in News & Events, vSphere API | Tagged , , | Leave a comment

Three Stages To Master Programmers

While everyone can learn and practice programming, it’s hard to find a good software engineer, even harder to find a great one. My definition of a great software engineer is someone who can solve real world problems with software expertise, not someone who can only write code, or someone who can only talk about architecture on paper, or someone who complicates real world problems.

Yes, we can all learn programming related concepts, languages, tools, and etc. But how to use them effectively on a business problem is really a test stone for anyone. It’s important to study textbooks, learn from others; even more so to

Posted in Software Development | Tagged , | Leave a comment

Reflection on OOP: Inheritance or Generalization

As software engineers, we most likely have learned the three key characteristics of object oriented programming: inheritance, encapsulation, and polymorphism. Over the years I study and practice OOP, I realized that inheritance is out of date and arguably misleading, therefore should be replaced.

In OOP, inheritance refers to a relationship between two classes in which a subclass inherits the properties and methods of its super class. The term inheritance is not really a good one because

Posted in Software Development | Tagged , , , | Leave a comment

How Many Programming Languages Are Enough?

During last 60 some years after computer was invented, there have been hundreds, if not thousands, programming languages. If we include domain specific language (DSLs), which accorinding to Martin Fowler may include regular expression, spreadsheet, etc, the number can be even bigger, not to mention more programming languages continue to emerge.

This would be a big burden if we have to learn all of them. Luckily, we don’t have to. In fact, most of us just need to learn several most popular ones. Even better, these popular languages may look very similar in syntax. As a result,

Posted in Software Development | Tagged , , | 2 Responses

Why Virtual Machine Not Found?

I saw a new bug (Intermittent ManagedObjectNotFound on VirtualMachine.getConf) filed in the open source VI Java API project today:

It looks like sometimes VirtualMachine.getConfig() returns null, but other times it throws:
Caused by: java.lang.RuntimeException: com.vmware.vim25.ManagedObjectNotFound
at com.vmware.vim25.mo.ManagedObject.retrieveObjectProperties(ManagedObject.java:158)
at com.vmware.vim25.mo.ManagedObject.getCurrentProperty(ManagedObject.java:179)
at com.vmware.vim25.mo.VirtualMachine.getConfig(VirtualMachine.java:55)

As the vSphere API reference points out,

Posted in vSphere API | Tagged , , | 2 Responses

Moving Virtual Machine Back From Distributed Virtual Switch

After blogging about moving virtual machines from a standard virtual switch to a distributed virtual switch, I saw a new question in VI Java API forum on how to roll it back. Technically, I don’t see any reason why one should switch back because using distributed virtual switch gives you a lot of benefits. But the decision is not mine but yours. Whatever you want to do, we help do it easily.

The method involved is

Posted in vSphere API | Tagged , , , | 4 Responses

Is serverGuid Attribute Really Needed in vSphere?

If you have paid close attention to the SOAP messages recorded by Oynx, you may have noticed that there is an extra attribute called “serverGuid” in a ManagedObjectReference. The following is copied from my previous posting “Moving Virtual Machine to Distributed Virtual Switch”.

<_this xsi:type=”ManagedObjectReference” type=”VirtualMachine” serverGuid=”BA9CE658-75F7-4A99-ACE6-99EB1376B94A”>vm-134</_this>

Note that this SOAP request message is from a vSphere Client. In VIJava API or other language binding, there is no such an attribute. You may wonder,

Posted in vSphere API | Tagged , , | Leave a comment

In Praise of Static Methods

In object-oriented programming, static methods are the methods that are defined with static keyword. They don’t have access to non-static instance variables. This very limitation can be an easy cure for many programming pitfalls I’ve seen over the years.

  • A static methods prevents you from using instance variables for passing information around, for example, as parameters to or as result from it. As a general rule, you should not define an instance variable if it’s not an intrinsic property of a class or type. It may seem obvious,
Posted in Software Development | Tagged , , , | Leave a comment

ManagedObjectReference vs ManagedObject

One of the most common confusions that a newcomer has while learning vSphere API is the ManagedObjectReference, a.k.a MOR. If you read the API Reference, you will find a lot of them. Recently there was a question poping in the open source VIJava API forum. So I think it is worth explaining it here.

There are two major types in the vSphere API: managed object types are for these objects on the server side only; and data object types for properties, parameters, and results, which can be send back and forth between client and server. The MOR is a data object type, but used to represent managed objects living on server side. If you are familiar with C/C++ programming, you can think of it as pointer in some sense. Even better,

Posted in vSphere API | Tagged , | 28 Responses

Most Used API in vSphere

Yesterday I blogged about the least used API in VMware vSphere. This naturally leads to another question, “what is the most used API in vSphere?” It’s a harder question than the “least” one, because for the latter I can be very sure that zero is the lowest possible usage. If that API is not the least, it must be one of the least.

Before we try to figure out the answer, let’s clarify a bit the “most used.” Does it mean the one that is called the most times? Does it mean the one that is touched and used by most developers?

Posted in vSphere API | Tagged , , | 1 Response

Least Used API in vSphere

Last week I was extremely busy working on the VI(vSphere) Java API 3.0 (codename: Crescendo) whose main theme to support the next release of vSphere. To my surprise, I caught on an API that should have been included in vSphere Java API 2.1 but somehow omitted. Even surprised to me is that no one has reported to me via our sourceforge.net tracker.

I think the conclusion can only be one –

Posted in vSphere API | Tagged , , | 1 Response

Moving Virtual Machine to Distributed Virtual Switch

The distributed virtual switch introduced in vSphere 4 has many benefits over the traditional switch. For one thing, you no longer have possible glitches with live migrating virtual machines from one host to another using traditional switches, and all your port settings go with your virtual machines.

If you have virtual machines using traditional switches, you can easily move them to new distributed virtual switches. The rest of this article explains how to achieve this.

You can use the

Posted in vSphere API | Tagged , , , | 3 Responses

Tagging: What’s the Alternative?

After my last post Tagging: An invisible feature in vSphere, William Lam quickly followed up with another post in his blog, arguing vSphere Tagging Feature Not So Invisible. He made his case by showing how you can actually add and remove tags using addTag() and removeTag() method via vSphere MOB. You can definitely play with your test environment, but please do not mess up with any existing tags in your production environment.

Although you can do that via MOB, it’s not the officially supported way (BTW, this should not be taken as show stopper. After all,

Posted in vSphere API | Tagged , , | 5 Responses

Tagging: An Invisible Feature in vSphere

If you are familiar with social media or research papers, you must know tagging already – You use keywords to label an entity, be it a blog post, an article, or something else, so that it can be easily searched out. So it’s a very useful feature in managing information.

In vSphere 4.0, VMware added tagging capabilities to the managed entities. According to the API reference of 4.1, it’s still an experimental feature and

Posted in vSphere API | Tagged , , , | 4 Responses

A Trick With OptionManager in vSphere API

There was recently a question in the open source VI Java API forum regarding the OptionManager. As you may have known, the OptionManager is used to manage key value pairs, for example, the “VMFS3.HardwareAcceleratedLocking” is a key as shown in the code included in the question. Somehow the code to set the key, as shown below, doesn’t work with com.vmware.vim25.InvalidArgument exception.

Posted in vSphere API | Tagged , , , | Leave a comment

Recorded Tech Talks Are Ready!

After publishing the tech talk slides, I am happy to announce that the record is ready now. If you have missed the onsite or online session, or simply want to watch it again, please feel free to click here. Note that you will need Adobe Flash 10.1 or higher to view the recording.

Many thanks to my colleague Luke Kilpatrick (@lkilpatrick) for helping with online streaming and recording, and Matt Dhuyvetter for setting up the top quality audio feeds!

Posted in vSphere API | Tagged , , , | Leave a comment
  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.