4 Ways to WIN $2,500 Prize With vSphere Java API

You may have read blogs from my colleagues Mike DiPetrillo, Duncan Epping about the VMware Script-O-Mania contest. The prizes are $2,500 (1st), $1,000 (2nd), and $500(3rd) respectively. The contest ends in March 15, 2010. So act quickly!

“Wait, how can I WIN the prizes?”

Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.

Well, first of all, you want to read carefully the criteria. Note that your script is for System Administrators with ESXi. So it could be for initial server set up, health monitoring, trouble shooting, reporting auditing, or anything else that is cool and creative. I suggest you talk to system administrators what REAL PAINS they have, and how they would like to fix the problems.

When you are clear what problems to solve, then let’s move on.

If you are already familiar with PowerCLI and RCLI, you should probably stick with them. You can get helps from VMware Developer Community.

If not, open source VI Java API can help you!

Here are 4 ways the API can do for you to win the $2,500:

#1. You can write program in Java on top of the VI Java API. Just download the VI Java API and plug it into any Java IDE. Here are the resources you may need: Get Started Tutorial, Download, 50+ Samples.

What else would you need? Top 10 Best Practices (part 1, part 2) and Common Mistakes Using vSphere SDK.

Have a question? Try our forum. It’s been pretty active.

Not yet convinced it’s a right choice? Check out what others say about it.

#2. You can write real scripts in Jython. To get started, you can check out my presentation. Timo Sugliani contributed a virtual appliance with everything packaged. Here are a little more instructions copied my last October announcement.

To run the virtual appliance, you will need either VMware Workstation, VMware Server or VMware Player. The later two are free products from VMware Download Site.

After compressed to RAR format, the virtual appliance is about 600M. After downloading the virtual appliance here, you can uncompress it to a folder using free 7-Zip or other tools. Double chicking the .vmx file will bring up the Virtual Applicance. The initial username/password is vijava/vijava. You can and should change your credential after first login.

In the home directory in the virtual appliance, there is an existing jython sample code. You can open it with any editor. My recommendation is vim which can highlight the syntax with different colors.

The sample code is really simple, it iterates through the hosts and virtual machines, and print out related information. It doesn’t run as it is because it doesn’t know your target server (ESX/VC/VMware Server 2.0+) host name or IP address, and username/password. All you need to do is to replace the XXX strings in one line of the sample code to match your environment. When you are done, just run it:

$jython testjython.py

Want more samples? I need to ping Timo and his colleague David for their helps.

#3. OK. Since you read this far, I know you are probably not a Java or Python/Jython guy. How about Groovy, jRuby or Scala or any languages listed here?. If so, you need to do a little more research by yourself on how to set up the environment and call into VI Java API.

#4. If you are here, I assume it’s not the language that is in concern. Maybe you concern about the size of your script? No problem. Check the tiny client REST API I blogged yesterday. It’s all open sourced under BSD license just like other part of the API. Please feel free to port it to any languages you are comfortable with, for example C# which we haven’t talked above but is a good choice as well.

Now I am done my part. It’s now your turn to give it a try. Any question on using the API, just ask a help here, or leave a comment.

Please let me know when you win the prize because of this blog, and I can feature you on our VI Java API project home.

Good luck!

This entry was posted in News & Events, vSphere API and tagged , , , , , , , , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Posted February 8, 2010 at 12:11 pm | Permalink

    Hey Steve,

    Given that the majority of scripts will be written in the powercli toolkit, do you think the judges will give any extra brownie points if something was written in the VI java api?

  2. Posted February 8, 2010 at 12:40 pm | Permalink

    Hey Sham,

    Thanks for the interest. I don’t think the language itself makes much difference in the final decision. The cross platform feature due to using Java may be a plus.


  3. Posted February 12, 2010 at 8:49 am | Permalink

    Thanks for that. Perhaps its time for new project in VI java :)

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    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.