Archive

Posts Tagged ‘vi java api’

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: ,

Most Used API in vSphere

June 21st, 2011 1 comment

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?

Least Used API in vSphere

June 20th, 2011 No comments

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 –

Moving Virtual Machine to Distributed Virtual Switch

June 14th, 2011 2 comments

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

A Trick With OptionManager in vSphere API

June 7th, 2011 No comments

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.

Recorded Tech Talks Are Ready!

June 6th, 2011 No comments

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!

A Powerless Feature in VMware vSphere

June 1st, 2011 No comments

Distributed Power Management (DPM) is a powerful (powerless, really) feature can reduce host power consumption in a DRS cluster. It works in either manual mode or automatic mode only when DRS is enabled. DPM can place idle hosts into standby mode, or awaken them from standby when more resources are needed.

Like most of the features in vSphere, you can manage them with the APIs. A recent question at the open source vSphere Java API forum asks how to get hold of the DpmBehavior data object. This seems easy but

Tech Talk: Automating Security in Dynamic Virtual Environments

May 26th, 2011 No comments

This is the tech talk by Elsa Bignoli, who is now a Software Engineer at Altor Networks (part of Juniper now). Elsa is one of the contributors to our open source vSphere (VI) Java API.

Check out her presentation slides below:

Tech Talk: Massive VM Provisioning in the Cloud

May 26th, 2011 No comments

This is the tech talk by Giridhar Padmanabh(@girip26), who is now a Sr. Manager at Cisco. He joined Cisco not long ago with the newScale acquisition. This tech talk draws on his 7 years of experience at newScale building industry leading software for delivering private cloud as a service.

Check out the slides below:

Tech Talk: Open Source VI Java API – State of the Union

May 26th, 2011 No comments

We had a great community meetup last Wednesday. Check out this post for the photos. Thanks to the speakers, we have the tech talks slides ready for you. If you have missed the event last week, just check out these slides in PDF format. At the same time, we are working to make the recording available. So stay tuned for announcement.

Here is the talk is by me. I reviewed the history, current state, and future road map of the open source vSphere Java API. In the end, I also shared 3 success factors for

VMware APIs & SDKs at VMware Communities Roundtable

May 21st, 2011 No comments

My colleague John Troyer (@jtroyer), who hosts VMware Communities Roundtable, has posted an interview with Alan Renouf (@alanrenouf) and me about our thoughts on VMware SDKs, APIs, and CLIs on May 18. During the interview, I answered questions about the open source vSphere Java APIs, the themes of my blogs (why it’s called doubecloud), what I am doing now at VMware, and of course our first community meetup event on the same day. If you have missed the session, you can listen to it now: , or here.

Our First Community Meetup Event

May 20th, 2011 No comments

Our first community meetup event on Wednesday night was a great success. It attracted about 200 developers/QAs and administrators globally either on site or online with live streaming. An EMC development team flied all the way from Irvine to join us; so did Huawei Symantec from Chengdu of China.

At the end of the meetup, we gave way 20 copies of these books: VMware VI and vSphere SDK by me, VMware vSphere 4.1 HA and DRS Technical deepdive (Volume 1) by Duncan Epping, VMware vSphere PowerCLI Reference: Automating vSphere Administration by Luc Dekens and Alan Renouf, and VMware ESX and ESXi in the Enterprise: Planning Deployment of Virtualization Servers (2nd Edition) by Edward Haletky; and many gadgets.

We know our attendees took their personal time mainly not

It’s today!

May 18th, 2011 3 comments

After preparing the event for almost two months, we are finally ready. If you join us onsite, here is direction to our venue. We have free food/drinks, and many books/gifts waiting for you, thanks to our sponsors and 12 volunteers. :-)

If you join us online, we have a great news for you. Instead of WebEx, we will have a live broadcasting. Here is the URL: http://bit.ly/osvimeetup, courtesy of @lkilpatrick. You can enter as a Guest on 7PM (Pacific Time) for tech talks.

Here are the 8 tech talks we pulled together. A bit long but

Managing vSphere on Android using VI Java API

May 10th, 2011 1 comment

It’s been a while since I checked the VI Java API fling at VMware Lab last time. When I checked it again yesterday, I found something new and exciting – VI Java API on Google Android. The following comment was posted there by a gentleman called Bob:

Great framework, I used it on a recently published android application (avmcontrol – vsphere client for android), I had to tweak it a bit, however developing for android using vijava was much easier then the same for iOS4 devices.

Following the link, I found

New Licensing APIs Since VMware vSphere 4: Swap Licenses

May 9th, 2011 No comments

Days ago I introduced the new licensing APIs since vSphere 4 and a sample that prints license expiration dates. Here is yet another sample that replaces an old license with a new license.

You may be wondering why anyone would do this. This is in fact not a typical use case. You probably know that vSphere Client does not treat license keys like passwords which are not visually displayed as dots or asterisks. As a result, anyone who can access a vSphere Client can write down license keys and use them elsewhere.

Normally this is not an issue at all. What about

vCenter Server Linked Mode: An API Perspective

May 4th, 2011 1 comment

A new feature called vCenter Linked Mode has been introduced in vSphere 4. It allows several vCenter servers to form a linked mode group. When you connect to any of the vCenter server via vSphere Client, you see all of them behind a single pane of glass.

I got questions from time to time, “what does it mean for vSphere API?” More specifically, if you connect to one vCenter in a linked mode group, will you “see” all of them? If not, how can vSphere Client achieve that?