VMware

Developer Center Blog

VMware Developer Blog provides content for the VMware Developer Community.

46 Posts 1 2 3 4 Previous Next
0

Folks,

Not that you need to be reminded but just in case some of you forgot – our PowerShell Scripting contest closes in just two short weeks !

If you are not up for a Free trip to VMworld the $5,000 of extra cash might help with back to school expenses…  The MacBook Air as a second prize is also very nice ;).

product-air.jpg


Hurry contest ends - August 30, 2008, 11:59pm PST

Winners will be announced Sept 7th, 2008

For more information http://vmware.com/go/powershellcontest

We have plenty of resources available to learn about the VI Toolkit for Windows
http://vmware.com/go/powershellcontest

-Pablo

0 Comments Permalink
0

Folks,

Just wanted to let you know the VMware Technology Exhange event is going to be held in Las Vegas September 15th (the monday before VMworld)

Focus of topics will be on VMware NDA Product Roadmaps, software integration points as well as provide a great opportunity to meet VMware engineering, and product management.

Event participation will require purchase of VMworld pass, plus entrance pass to event itself. Participants must be approved TAP members.

For more information:

Event Information http://vmwaretechnologyexchange.com/
TAP Partner Information: http://www.vmware.com/partners/alliances/programs

0 Comments Permalink
0


I posted a presentation on programming VI with .NET using the VI Toolkit (for Windows) to slideshare. If you're looking to develop a .NET application for VI and not looking to use PowerShell, this presentation shows you how to simplify C#, VB, etc. programming using an assembly distributed with the VI Toolkit (for Windows).

Check it out at http://www.slideshare.net/vmwarecarter/using-vi-toolkit-for-windows-from-net

0 Comments Permalink
0

Scripting VI SDK with Jython

Posted by Steve Jin VMware Jun 8, 2008

“Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.” http://www.jython.org/Project/index.html

If you know Jython or Python, you can easily take advantage of VI SDK to manage VMware virtual infrastructure. Here is a sample HelloVM code:

HelloVM_py.jpg

These 7 lines of Jython code could take you 100+ if you will code it using VI SDK web services interface directly.

Please click Scripting VI SDK with Jython.pdf.

0 Comments Permalink
0


The VI Java API project finally got open sourced and established itself at sourceforge.net.

The project home: http://vijava.sourceforge.net

The project info is as follows: http://sourceforge.net/projects/vijava

Source code: https://vijava.svn.sourceforge.net/svnroot/vijava/

Download link:http://sourceforge.net/project/showfiles.php?group_id=228007
The jar file listed there has binary, source, samples and License.txt/README.txt.
Documentation link: http://sourceforge.net/docman/?group_id=228007
Two links to two PDF files are provided: get started with VI Java API, and object model of VI Java API. Since sourceforge.net supports only HTML in documentation, so I just provide a link in the document. The direct links to two PDF files are:
https://vijava.svn.sourceforge.net/svnroot/vijava/trunk/docs/Get started with VI Java API.pdf
https://vijava.svn.sourceforge.net/svnroot/vijava/trunk/docs/Object model of VI Java API.pdf

Please let me know if you have any suggestion and/or would like to become a committer to the project. I am looking forward to hearing from you.

AGAIN, it's an open source project, not a VMware product offering. If you need any help, please come to the sourceforge.net project.

0 Comments Permalink
0

We just published this article might be useful to folks out there.

VMware KB 1005039 or click here for direct link and details on work around.

-Pablo

0 Comments Permalink
1

I presented the Java API for VI SDK at VMware Technology Exchange in San Jose yesterday and got very positive feedbacks.

Here are two UML diagrams I used in my presentation. I think they are very helpful to understand the API and the design thoughts behind it.

1. The overall object model

overall.JPG

It can be inferred from our VI SDK API reference. Please note that we don't have a managed object type called ManagedObject in our reference. This is a type defined to capture all the common properties and behaviors of all managed objects. Given the limited size, I only show the names of the types, not properties and methods.

To better group these managed object types, I used 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, for example getAuthorizationManager().

In the middle of left side, you can find ManagedEntity class and its sub-classes like HostSystem, VirtualMachine. These classes represent all the items you could find in the inventory tree from VI client. 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. For this reason, both HostSystem and all the attached classes are tagged the same color.

2. A detailed partial UML diagram

detail.JPG

This UML diagram is extracted from the overall model but adds much more details with properties and methods. If you can understand this diagram, you can then easily understand all the other managed object types.

The ManagedObject class holds three properties:

1. mor of type ManagedObjectReference -- pointing to the ManagedObjectReference object that is used to represent a managed object in VI SDK.

2. serverConnection of type ServerConnection -- pointing to the ServerConnection object I will cover later.

3. objectContent of type ObjectContent -- used for local caching for better performance.

Besides accessors, the class has getCurrentProperty() method defined to encapsulate the PropertyCollector. This method gets called in subclasses to get a property. For example, the getName() in ManagedEntity called it like (String) getCurrentProperty("name"); In most of cases, you don't need to use it at all, I already provide explicit getter methods in concrete subclasses. I may change its visibility to protected later. The other two methods, "getCachedProperty() and refreshPropertyCache()" are designed for caching.

The ServerConnection is used to represent a connection to the server under a specific login user. It holds information like url to the server, the userSession with username etc., and vimService which is the JUMBO interfaces with 300+ methods. For convenience, ServerConnection also has a reference to a ServiceInstance object.

Now let us take a look at the ServiceInstance type. It's a special managed object and the first managed object you will have in a typical application logic flow. You can create a new ServiceInstance object by providing url/username/password, or url/sessionID combination. The later is not used as much as the first constructor, but very helpful when you develop a VI client plugin in Java. I will talk more about it later blogs.

According to the API reference, the ServiceInstance has a ServiceContent object, which holds all the ManagedObjectReferences to various "manager" attached to it, and an AboutInfo object. You can get any of them in a single call. ServiceContent object is, therefore, no long needed, and I don't even provide a getter to it.

The right side of the diagram are the ExtensibleManagedObject and its subclass ManagedEnity. E.M.O doesn't have methods defined at all, but three properties. Therefore it only has three corresponding getters.

ManagedEntity is one of the most important class given that VirtualMachine, HostSystem etc. are all inherited from it. Besides accessors and several methods, I provides some methods to retrieve items in the inventory tree. For example, you can easily find all the Virtual in one single call. Property is used within these methods, but you don't see it.

The above two ML diagrams should have given you a big picture about the object model and how key types are related to each other. If you really need to know more details. Please click into my May 8 posting and read the source code there. For sure, it will give you much more details than I can cover in these two ML diagrams.

1 Comments Permalink
1

The open source client side Java API for VI can now be found at

http://sourceforge.net/projects/vijava

Thanks!

1 Comments Permalink
0

Folks,

Just wanted to let you know that we have just published a document to help you get started when using the VI Toolkit for Windows.

Document Title: Managing VMware with PowerShell - Frequently Asked Questions.

Document contains frequently asked questions and code samples to help you get going.

A big thank you to the Product Management, Developer Support Engineering and R&D teams who contributed to document. We hope the document is useful, and please feel to comment so we can improve our products.

Link: http://communities.vmware.com/docs/DOC-4210

Regards,

Pablo

0 Comments Permalink
0

Folks latest script added to our library. Script allows users to set the boot preference for a virtual machine.

http://download3.vmware.com/sample_code/Perl/VMBootOrder.html

For complete list of scripts:
http://www.vmware.com/communities/content/developer/samplecode/index.html

Let us know what else you would like to see added...

_P

0 Comments Permalink
0

The VMware Technology Exchange Event..

I have been recently involved with helping put together the VMware Technology Exchange event and wanted to share some insight on what the event is about and why an ISV / IHV might be interested in attending..

Event goals: The goal of the VMware Technology Exchange event is to get our partners and product teams together to share product directions, understand integration points, and learn how VMware can help you go to market with your solution.

About the sessions: We are planning on 70% percent deep technical content and 30% business topics making this ideal for Product Managers, Software Developers, Development Managers and Business types. If I were to recommend sessions for folks out there interested in VI integration I would suggest Power Shell for Partners, VI Performance Monitoring and the VC Client Plug-ins. I tend to lean in favor of the VI oriented sessions but there are plenty of other sessions discussing Security, Storage and Applications.

Who can attend ? We are limiting this to our Technical Alliance Partners (TAP) members so if you are not a TAP member you might be interested in joining the program... For folks on a budget the Access level is no charge and you can apply at: http://www.vmware.com/partners/alliances/programs/

Please note there is a Event Fee of $725 and it also includes a 1 year license for VMware Infrastructure and VMware Workstation.

So if we see you there be sure to say hello, and if we meet during the reception I would be more than happy to purchase you a refreshment of your choice.

Regards,
Pablo Roesch
SDK Product Marketing Manager

Event Details:

When: May 13, 14, 2008 San Jose Convention Center, CA

Registration Website, more information: http://vmwaretechnologyexchange.com

0 Comments Permalink
0

This week VMware announces the latest Software Development Kit and I had a chance to catch up with Hari Krishnan the VMware Infrastructure Product Manager for the VDDK.

Pablo: Please tell us about your professional background?
Hari: My professional background includes over 10 years of varied experience in product management, product marketing and technology development for software, security and networking products. Before joining VMware, I was a product manager at F5 Networks for SSL VPN product line. Prior to that I co-founded a start-up ISPsoft, Inc. where I managed IP service provisioning software product. Earlier in my career, I worked in Bell Labs (Lucent) where I developed technologies for IP network management. I got my MS degree in Computer Science from University of California at Los Angeles (UCLA) and Bachelor of Technology degree from Indian Institute of Technology (IIT), Chennai. On the personal side I enjoy the great outdoors and thought it would be nice to have an image of my favorite vacation spots; Yosemite National Park. yosemite.jpg

Pablo: You must be excited about releasing the VMware Virtual Disk Development Kit, can you tell us why our developers should be interested in it?
Hari: Yes. With VMware Virtual Disk Development Kit we are enabling a new eco-system of partners to develop solutions that integrate with VMware virtual disk. The VDDK is an open SDK that developers can use to build cutting edge applications for creating and accessing VMware virtual disk storage.

Pablo: What are some of the use cases for using the VMware Virtual Disk Development Kit?
Hari: Virtual Disk Development Kit provides easy access to VMware virtual disk storage.

This enables a wide range of use-cases for application vendors including:
o Creation of virtual machine disk files to store backup of physical images
o Read access to virtual disk to enable off-line centralized scanning of virtual machines for anti-virus
o Write access to virtual disk to enable off-line centralized patching of virtual machines Read access to virtual disk
to enable off-line software package analysis of virtual machines

Pablo: Can you tell us how the VDDK compare contrast to our other SDKs ?
Hari: Sure. It’s important to understand the focus of various VMware APIs and SDKs when developing a solution that supports VMware virtual infrastructure. VMware Developer Center is a good place to start.

In particular, if you are developing a backup solution it is important to understand how VDDK compares with VCB (VMware Consolidated Backup) and VI API. VI API is a Web Service / XML interface focused on management of virtual machines and ESX host configuration. Virtual Consolidated Backup enables LAN free backup of virtual machines from a centralized proxy server and eliminates backup traffic from your LAN to improve performance of production virtual machines. VDDK is focused on efficient access and transfer of data on virtual disk storage. VDDK can be used in conjunction with other APIs to offer a complete integrated solution for management of virtual infrastructure. For example, you can use VI API to discover virtual machines deployed on ESX. VDDK can be used to read or write information onto virtual disk associated with a virtual machine. Backup vendors can augment VCB with VDDK to tightly integrate with VMware virtual disk storage.

Pablo: What is the relationship between Open Virtualization Format (OVF) and the VDDK?
Hari: Open Virtualization Format (OVF) is an open, industry standard for packaging and distributing virtual machines. OVF can be used to encapsulate meta-data about a virtual machine such as virtual hardware requirements, licensing information, virtual disk information and product information for virtual appliance. OVF is extensible so virtual appliance vendors can also embed additional meta-data about their product in OVF. OVF supports multiple virtual disk formats including VMware’s VMDK format as well as Microsoft’s VHD format. OVF simplifies deployment of virtual machines by offering a standard way to package and distribute virtual appliances for multiple hypervisor platforms.

VDDK is an open API and SDK to create and access information on VMware virtual disk storage (VMDK). Future versions of VDDK will include support for creating and accessing virtual disks packaged in OVF format.

Pablo: What should our developers do?
Hari: I would encourage developers to check out the VMware developer center, download the VDDK, get involved in VMware developer community, ask questions as well as give us your feedback.
For Download http://vmware.com/go/virtualdisksdk . Bookmark link to VDDK Forum VDDK forums

0 Comments Permalink
0

VMware Developer Center Blog - Developer Spotlight April 4th, 2008

andrew_2.jpg

I had an opportunity to meet with Andrew Kutz and wanted to share this conversation with folks out there that might be curious on who the person is behind the great contributions he has provided to the VMware Developer Community.

Andrew: First of all, thank you for this honor. The VMware online communities are for me the most professional and helpful forums I have ever had the opportunity to be a part of, and to be singled out amongst the long list of brilliant participants is an experience I will not soon forget.

Pablo: Tell us about your programming background and work experience?

Andrew: Short Version : I'm a geek whose had the privilege of working in a variety of odd jobs (from a boat valet to a Senate Paige) and Programming languages (from C to C#) for the last decade, transforming me into somewhat of a mutt, just like my baby boy Scruffy who is pictured with me above. I guess I fit the old cliche, "Jack of all trades ...". I don't really qualify for the "wearer of many hats"description since those who have met me know that I pretty much only wear my gray fedora, and that's it : )

Long Version: A lot of people are a bit taken a back by my area of study in college -- my degree is in Ancient History and Classic Civilization, so I do not have the same structured background as a lot of the developers you may meet. While some individuals look at my resume and deduct a point from their opinion of me, I've never looked at my chosen educational path as a negative, rather I think it taught me a whole separate area of critical thinking that a lot of programmers are missing these days. Truth be told my intent was to pursue a career in law, but I married soon after graduating college and my number one priority became helping my Mandy finish her graduate career in the history department at the University of Texas at Austin (UT).

Despite my penchant to disappear at parties only to be found upstairs participating in a mad orgy of Latin and Greek oration, I have actually been hacking out code since the days of Q-Basic and Nibbles.I suppose my professional programming career began when I worked at the American Crane & Equipment Cooperation (ACECO) and then went into hibernation once I began attending college where I worked several very non- technical jobs (albeit still geeky): a music geek at Tower Records on the Drag, a political geek as a paige at the State of Texas Senate, and even a car and boat geek as a valet for a lake-side restaurant. Eventually I ended up working for the UT Academic Computing and Instructional Technology Services (ACITS) Help-desk. From the help- desk I moved to the NT group that became the Windows Enterprise Services (WES) group. I stayed put for another 7 years in which time I cranked out a bunch of random code that somehow managed to function as Sudo for Windows (Sudowin), Exchange resource schedulers,Mainframe-to- Active Directory account synchronization web services, and they even let me manage a few servers(Terminal, Web)!I also helped create the first central-IT virtualization solution at UT using VMware ESX 2 and VirtualCenter. Just as the virtual infrastructure was getting off the ground I did something silly and left UT to pursue an Analyst position with the Burton Group. After 6 months I learned that the life of the analyst was not for me (too hands off), and I returned to UT as a member of the Information Technology Services (ITS) Applications group where I am currently abusing my on-the-clock time to respond to these questions! : )

Oh yeah, just because my editors would be a little peeved if I didn't mention it, I also write for SearchServerVirtualization, SearchVMware, andSearchEnterpriseLinux.TechTarget.com. So, you know, check them out! : )

Pablo: Tell us about any recent or cool projects you are working with using the VMware SDKs ?

Andrew: (All code mentioned is freely available under the New BSD license)Sure thing! FYI - all of the current VMware-related code I am working on is FREELY available or linked from http://www.lostcreations.com/code/wiki/vmware/

. Definitely one of the cooler things I am working on is Monét.Monét exports VI logs to a syslog or Windows event log server. I wrote it in part to help other developers understand basic ideas about VI SDK development, and since it is implemented in C#, Java, and Perl, it is a great way to see how to transition between the different languages
that are available to leverage the VI SDK. About a month ago I managed to get lucky with Lutz's Reflector and figured out how the internal plugin architecture of the VI client is
put together and released the SVMotion plugin. Since then I released a PDF that explains the VI plugin architecture and hopefully shows other developers how to create plugins (I apologize if it doesn't make sense, I wrote most of it while trying to keep track of the
goings-on of 4 dachshunds). In an effort to recapture some hosting costs I started VIPlugins.com for the sole purpose of injecting some Google ad placements (j/k). So far I've had +12,000 downloads of the PDF and various plugins and no click-throughs -- sigh. Two of the cooler plugins are Invoke, which lets you invoke third-party applications from within the VI client using the currently authenticated session cookie and 37migrations. The 37migrations plugin works in conjunction with 37migrations.com to plot VMotion events across the world.Basically I was looking for an excuse to play with the Google Maps APIs : )

I also started work on ivi - the Java Virtual Interface (sorry, that's my Latin showing --J's looked like I's back in the day -- wayyy back).ivi is an attempt at creating an OS-agnostic management application for VMware VI, Xen, KVM, and OpenVZ. ivi attaches to the aforementioned virtualization solutions using the VI SDK, the XenAPI, and lib-virt. So far ivi can connect to VI and Xen and list their contents. Once I get lib-virt to compile and function (the latter is the hard part) on my Mac I will include support for KVM and OpenVZ. I know the project is in alpha stage, and while the milestone of listing contents seems simple, the project is more about creating an abstract plugin architecture for accessing multiple virtualization solutions than actually producing a marketable product. Again, the code for ivi is OPEN and FREE.

Some ideas swirling around in the mess that is my mind include:

- - Implementing the Cisco IOS commands for the ESX virtual switch infrastructure using Perl? Maybe? Dunno yet...

- - A free and open implementation of VirtualCenter called OpenVirtualizationManager in order to help reduce the cost of a VMware Infrastructure.

- - A role-playing game at VMWarpg.com that uses stats from your VI installations to generate stats for your avatars, and you battle for territory on Google maps. Think D&D meets Risk.

- - A version of the VI client written with the Google Web Toolkit called Aianteia (cooming soon).

Some people may ask, "Aren't you worried about showing your hand?" Not really, if you want to take any of these ideas and run with them, please do so. I just ask that if you need help that you ask me as I'd love to be involved. I'm just in it for the fun. It was for the groupies, but turns out that virtualization groupies, yeah, not so much. : )

Pablo: How long have you been using the VMware SDKs and what has been your experience using them ?

Andrew: I have been using the VMware SDKs since the summer of 2006 when I started playing around with the VI SDK in order to automate the creation of port groups. I parlayed that experience into a series of articles forSearchServerVirtualization.TechTarget.com called "Leveraging the VI SDK with .NET" that have apparently remained high- traffic articles to this day (It's got to be because of spiders, certainly not readers!) : ) Anyway, I've been hooked for developing for VMware and other virtualization solutions ever since.

Pablo: What would you like to see from VMware in terms of SDK / API functionality ?

Andrew: I would LOVE to see the equivalent of the VI Perl Toolkit for C# and Java. I now understand that the odd nature of the SDK (a reference for one and all!) is simply due to the nature of SOAP, but it does not make it any less aggravating to deal with. I have played with the C# toolkit that VMware uses internally and it is sooo smooth. Smooth like a line of Aaron Sorkin's dialogue smooth. We're talking triple-blade action smooth. You get the idea.

I would also like to see a unified SDK. In terms of Java:

com.vmware.vim
com.vmware.workstation
com.vmware.fusion
com.vmware.server

And the all important:

com.vmware.common
com.vmware.virtualmachine

The last one would be really nice in order to tie together common VM properties and such. Of course, this would have to be a public- facing SDK that VMware wasn't married to for revision purposes, but it would still be nice from a developer point-of-view to have
VM-management code work regardless of the intended product or platform. Of course, this is probably made difficult by the generational differences between all of VMware's products, but a boy can dream, no?

Pablo: Any tips for developers out there new to the VMware SDKs ?

Andrew: Certainly they should use the VMware Developer's Center! Us "old- timers" did not have access to such a luxury back in the "day" (umm, last year!), so anyone new to VMware development should certainly take advantage of VMware's new commitment to its development communities.Also, you can always e-mail me. I'm always happy to help out when I can.

In a previous Spotlight, Tom Milner related some sage advice that I would like to repeat -- "What do you want to do with it?" Tom, I could not agree more. Too many developers see a problem and create a solution. That works, but you usually end up with a fairly boring solution. I like to throw caution to the wind and come up with the idea of a solution, and then build the pieces that it takes to get there. At Austin's SXSW festival this year, Apple engineer Michael Loop shared with audience members Apple's design process(http://www.businessweek.com/the_thread/techbeat/archives/2008/03/apples_desi gn_p.html?campaign_id=rss_blog_techbeat). Basically, Apple approaches its design process much like a car designer or a fashion mogul - they design the fantastic and then look for the kernel of truth in their design and work backwards in order to turn truth into reality.

VMware developers should seek the truth in order to create solutions that are beautiful, fun, and fantastic.

0 Comments Permalink
1

VMware Developer Center Blog - Developer Spotlight +March 4, 2008
TOM.JPG Tom Milner Developer nworks.com

I had an opportunity to catch up with Tom Milner from nworks to get his perspective on using the VMware SDKs. Tom also had some good feedback on how VMware can improve the SDK developer experience.

Pablo: Tell us about your programming background and work experience.
Tom: I guess my gray hairs speak to my experience. I've been a software developer for over 30 years and have worked with large companies like Huges Aircraft and Hewlett-Packard, and I've worked for startups and smaller companies (the smaller companies are more fun). I've got a lot of background with C and Java doing network management, device management, and performance management products. For the last two years I've been with a small software firm called nworks, which makes plug-ins and connectors for enterprise management software from Hewlett-Packard and Microsoft.

Pablo: Tell us about what your application does, and maybe describe your approach.
Tom: VMware Management products fill a niche that develops when virtualization is brought into a data center. Enterprise-class companies use products like HP's OpenView or Microsoft Operations Manager to monitor infrastructure like their phone systems, heating and air systems, manufacturing, networks, and data centers. These applications
are large rule based engines that look for abnormal situations before they become an issue and either fix the situation on their own or notify someone to take action. To monitor the servers in the data center, software agents are deployed on these servers to return hardware inventory, status, and operational performance data back to the enterprise software. This method worked fine for years until VMware came along. As many engineers are aware, the wall-clock in a virtual machine ("VM") is no longer steady over time. When VMs lose the physical processor their clock stops running. And when they regain the processor, one of the first maintenance steps must be to move the clock forward to the current time before proceeding. In other words, the VM's clock "jumps". So all of the tools that used to rely on the system clock to tell them how long they've been working no longer work correctly. Think about it, how do you figure out CPU utilization, for example, if you no longer have a clock? The VMware designers of the SDK were aware of this problem and added the performance interface to the SDK to fill this void.

Our product uses the SDK to pull in key performance data, plus the event stream from the Virtual Center (which is also missing from these applications), and integrates it into the enterprise application. This data is coupled with about 200 rules that we provide that are also installed so that the IT administrators can manage the virtual world the same
way they manage the physical one. In addition to performance and event data, we also use the SDK to provide management action capabilities like shutting down or suspending a VM, or placing a host into maintenance mode.This is very powerful stuff! Imagine a scenario where HP OpenView or Microsoft's Operation Manager receives an event that a fan has gone out in the middle of the night on one of its DRS servers in some data center hundreds of miles away from central IT
administration. The rules for this scenario can be customized so that a technician is notified automatically and the ESX Server is set into maintenance mode (through the nworks technology and the SDK). Because its a DRS server, all the VMs automatically begin migrating to other ESX Servers. When the technician arrives with the new fan, the
ESX Server is ready to be repaired, no downtime, no processor failure, and no human intervention required by IT Administration. The IT administration can watch the ESX Server status from the same enterprise console
that they use to monitor all of their other sytems.When the system with the bad fan is repaired, they can take the ESX Server out of maintenance mode directly from that console.

Pablo: This sounds like a very exciting approach. Can you tell us about your initial experience coming when you first started using our SDK ?
Tom: Well, I'd like to say it was easy, but it wasn't. I started before the first release of the
SDK, so documentation and samples were scarce, and so were people who knew how to do things with it. And you have to understand, the SDK supports an industrial strength API, no doubt about it. When I started with nworks, we were using the older COM API, which was nice for small systems and supported simple scripts. But it couldn't scale past a single system. The VMware designers were looking for something that could support hundreds of ESX Servers with thousands of VMs. They wanted an API that was so robust that it would satisfy all requirements, even for VMware's own VI Client. And that's what they came up with. The API is a SOAP based API, which means that the client-side is described in XML rather than shipping a client side library. When you get the SDK, you build the client-side libraries yourself by using the VMware-supplied XSL scripts to convert the XML definitions into C, C#, or Java source code. This conversion makes it easy to port the client-side of the SDK to almost any platform, but it also makes it difficult to document the client-side,and VMware hasn't done their best efforts in that regard. (Note: The VMware SDK ships with pre-compiled API stubs for Java) The SDK also returns different objects by using the same calls which requires a lot of casting for type-safe languages like C# and Java. Because the client side documentation is so weak, my first development cycle was: Develop code using the next API call,use the debugger to determine the exact object being returned, repeatIt wasn't until I had hit most of the API calls that I could really plow ahead without a debugger to decode what type of object was being returned.

Pablo: Sounds like you have some ideas about what things we could be doing to improve the developer experience?
Tom: It's easy to be a Monday-morning quarterback, and I know that the problem of supporting such a robust and critical API is an immense one, but my two recommendations for VMware are:

1. Code up many more stand-alone code samples (a good job for interns).
2. Put these samples on the web with a API cross-reference.

The VMware documentation for each API call is sufficient to explain what it does, but it's only documented from the server's side. The code samples will show what object is being returned on the client side and will show how the API calls interact.

Pablo: Are there any tips or hints you can provide to our readers, lessons learned of a different approach you would consider next time?
Tom: Despite some of the getting started pain, using the SDK has been very good for nworks. Other companies have tried to put agents in the console O/S and are now scrambling to figure out what to do with ESX 3i. And console agents means additional overhead for the customer's ESX Server which is NOT where you want to be putting it. So
for us, having an agent less architecture that scales well has been great. I love it when a customer with a dozen or more ESX Servers and 200 VMs asks us "What agents do I need to install on my virtual machines?" None. "Well, what about my ESX Servers?" None. That's usually when they smile.

If someone wants to pick up the SDK, the first thing I'd ask is "What do you want to do with it?" If you're looking for simple/quick scripts to dump out a simple list, perhaps you should look at the VI Perl Toolkit. If its a larger application in terms of data or functionality, then the SDK is the way to go. One of the tips I would give people is if you're going to use the SDK API, become familiar with the Managed Object Browser ("MOB"). The MOB is a great interface provided by VMware that gives a (relatively) raw view into all of the runtime properties of an ESX or VC Server. And if the MOB can see it, then so can the API. Secondly, the VI Client is implemented using the API, and according to VMware, there are no back doors... so if the VI Client can see it or do it, then so can the API.

There is some ramp up time to using the SDK, but once you understand it the sky is the limit.

1 Comments Permalink
0


For folks that might have recieved errors when replacing a VMDK with another VMDK file using FileOperation this Knowledge Base Article was just published, hope its helpful. KB ID 1003567

0 Comments Permalink
1 2 3 4 Previous Next

Developer Center Blog

VMware Developer Blog provides content for the VMware Developer Community.

Communities