Archive

Archive for the ‘Virtualization’ Category

Escaping Characters for SOAP XML: Late But Here

September 26th, 2011 No comments

It’s a known bug in VI Java API that it did not escape strings to be included within a XML tag. The potential risk, although very very rare, is that it can blow the de-serialization of a request on the server side. I did get one or two reports on failing on login, which turned out to be caused by special characters like < or > in passwords. As a quick fix, an escaping logic has been added to escape the special characters in passwords.

Categories: vSphere API Tags: , ,

Missing ArrayOfDatastoreEventArgument

September 19th, 2011 3 comments

After the vSphere Java API 5.0 beta was released, I got a very interesting bug that I think is worthwhile to share with the community. Note that I used the word “interesting.” It turned out to have no solution logically, but quite easy to work around and patch up. The workaround addresses only particular issue but does not prevent similar bugs from happening in the future.

Confused? Let’s take a quick look at the bug report:

Categories: vSphere API Tags:

VIX Implementation in vSphere Java API

September 12th, 2011 No comments

Among all the new features vSphere API exposes, I think VIX integration is very important. All of sudden, the vSphere API gets a boost on manageability of guest OS, and you can do many more with single set of APIs.

Categories: vSphere API Tags: ,

Fixed a Bug in Client REST API

September 6th, 2011 No comments

As reported by the open source VI Java API community, a bug came to my attention. It’s related to the Client REST API which is a powerful hack with vSphere MOB based on a little secret. Started in vSphere 4.1 update 1, things started to break if you want to call a method with the REST API while retrieving properties continues to work.

Categories: vSphere API Tags: , ,

VMworld 2011 Las Vegas: Day Two

August 30th, 2011 No comments

Today is day two of VMworld 2011 in Las Vegas. VMware CTO Steve Herrod got on stage with his technology deep dives into various products and new projects around the cloud story – “your cloud, own it.” Again this is based on my note and memory, and has not reviewed by anyone. Mistakes are all mine.

VMworld 2011 Las Vegas: Day One

August 29th, 2011 No comments

Today is day one of VMworld 2011 in Las Vegas. The most important part is of course the keynotes by CEO Paul Maritz and Co-President Carl Eschenbach. The following is based on my personal note and has not reviewed by anyone. All the mistakes and errors are mine and only mine.

Simplified vSphere 5.0 API Reference Online

August 27th, 2011 3 comments

After the vSphere 5.0 was released, I checked the vSphere Web Services SDK documentation page. Upon clicking the vSphere API Reference link, I got into the vSphere 5.0 Documentation Center as follows:

It’s a bit surprise to me. First of all, I like the integrated approach where you can find all the information related to vSphere 5.0: from user manual to SDK/CLIs, and even links to communities/blogs. Also, you have nice features like bookmark, search and printing, etc.

Announcing VI Java API 5.0 Beta

August 25th, 2011 4 comments

Now that vSphere 5 just GAed today, I am happy to announce the public beta of VI Java API Crescendo release. Based on the feedbacks I got from the community, especially William Lam, I decided the new version to be 5.0 beta so that we can sync up with the vSphere 5.0.

Categories: vSphere API Tags:

What’s New in vSphere API 5.0

August 25th, 2011 17 comments

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.

Categories: vSphere API Tags:

Uniqueness of MOIDs

August 16th, 2011 8 comments

A question was recently posted at the open source VI Java API forum regarding the uniqueness of MOIDs. The developer who raised the question wanted to build a caching on the client side so as to avoid getting back to the server for the name of a virtual machine with its MOID. If MOID doesn’t resonate with you, you may want to read this post before reading on.

Programmable Data Centers: Next Big Thing in IT?

August 8th, 2011 No comments

As cloud computing gains momentum, more mega data centers are constructed or to be constructed. You can find cool videos on how companies like Google, Microsoft build and run their state-of-the-art data centers.

In these data centers, computers/storage/switches are packed and wired inside containers in factory before being shipped to a data center. After hooking up power, networking, and cooling, a container of servers are ready to go. These advances have

Workaround: vSphere Java API with Java Web Start

August 2nd, 2011 No comments

If you are using, or intend to use, the open source vijava API with Java Web start, you want to read this article carefully.

A community user recently reported an issue in this scenario. His test application was launched via Web Start jnlp. “First, when run a single test thread everything is fine and the VM tasks operate normally.  However as soon as we kick off a second test thread while the first test thread

Filtering vSphere API Requests

August 1st, 2011 No comments

I got an interesting question on how to find out WSDL files are used by vSphere Web Services at the VI Java API forum. After some clarification, it turns out the questioner just wanted to know what methods are called, so that the proxy between client and vCenter server can decide whether it should be allowed to go through.

Although a rare use case, but it’s a valid and sophisticated one. In general, you can use vSphere built in feature for security, for example,

Categories: vSphere API Tags: , ,

Is Compression Supported in vSphere API?

July 26th, 2011 No comments

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,

Categories: vSphere API Tags: ,

How to Save With New vSphere 5 Licensing Model

July 25th, 2011 8 comments

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,

Success Story: Cisco Data Center Network Manager

July 20th, 2011 No comments

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

Why Virtual Machine Not Found?

June 30th, 2011 2 comments

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,

Moving Virtual Machine Back From Distributed Virtual Switch

June 29th, 2011 4 comments

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

Is serverGuid Attribute Really Needed in vSphere?

June 28th, 2011 No comments

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,

Categories: vSphere API Tags: , ,

ManagedObjectReference vs ManagedObject

June 23rd, 2011 20 comments

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,

Categories: vSphere API Tags: ,