VMware

Developer Center Blog

VMware Developer Blog provides content for the VMware Developer Community.

2 Posts tagged with the lab tag
0

We wanted to let you know we ran a very successful vSphere SDK lab at [Partner Exchange / Tech Exchange a few weeks ago in Orlando. For those of you who missed the event, I'm posting the manuals and code files. Going through the lab is a great way to get started with the API and includes handy sample code for modification or inclusion in your own programs.

{youtube}http://www.youtube.com/watch?v=paGqr9SWl-4{youtube}

The lab covers both the Java and C# versions of the VI SDK and uses the vSphere Web Services SDK 4.0 (formerly VI SDK 4.0). Though the lab doesn't cover any vSphere-specific features, I haven't tested it with VI SDK 2.5 and it will probably require some minor modification. For scripters that would prefer an introduction to the vSphere Perl SDK (formerly the VI Perl Toolkit) or the vSphere PowerCLI (formerly VI Toolkit for Windows), I posted a similar lab for those in an earlier blog post.

Exercises cover all the basics for using the SDK:
* Understanding managed objects and data objects
* Connecting to the VI API webservice
* getting the properties of managed objects using the PropertyCollector
* Using the SearchIndex
* Finding objects using TraversalSpecs
* Finding objects based on arbitrary criteria
* Collecting properties of multiple objects at the same time
* Understanding performance differences in some basic property collection strategies
* Monitoring properties for changes
* Monitoring tasks for completion
* Gathering performance statistics

There's obviously a lot more to do in the SDK, but once you've mastered those basic skills, most of the rest of the SDK is just an extension of what you already know. The exercises on collecting multiple objects properties at the same time and understanding performance differences due to property collector strategies cover some common problems I see with the management ecosystem partners I handle and are a great review for anyone trying to make sure their SDK code scales well.

A few things to note: I didn't update the doc with the new names of the various API components... I wrote the lab while those names were still under development. Also, I want to thank the other folks who helped put this lab together: Balaji Parimi (who wrote the Java code), Rajesh Kamal (who wrote the C# code), Alton Yu, John Kennedy, Paul Vasquez, and Steve Jin.

While most of the code handles errors gracefully and follows best practices, I’d like to point out that the code here is designed to teach concepts, not to be “enterprise ready”.

0 Comments Permalink
4

Hello, my name is David Deeths and I’m a new contributor to the VMware Developer Blog. I wanted to share with the community the scripting lab we put together for VMworld 2008. This is a great introduction to scripting with the VI Toolkits in Perl or PowerShell. The PowerShell version doesn’t require any programming or scripting experience at all.

The labs will help you get started with scripting VMware Infrastructure to enable automation, extensibility, and integration with existing tools. When we ran this at VMworld, we had about 600 attendees and it was so popular some students camped out in line to attend the lab a second time. We had so many folks request a way to share this with their teams that we decided to publish the whole thing for the community.

The lab is available in two versions: one shows how to use the VI Perl Toolkit and the other shows how to use the PowerShell-based VI Toolkit (for Windows). The attached files contain the manuals for both versions of the lab and the exercises for both versions of the lab.

The lab takes 2-3 hours to complete (not including the time to set the environment up first), but is conveniently split into 20 minute exercises. You’ll walk away with a better understanding of VMware Infrastructure, resources for using the toolkits, and a variety of useful scripts for performing common administrative tasks. The exercises cover triggering tasks, examining VM attributes, performing actions on VMs, and exporting performance data.

My team for the lab was phenomenal, and I want to thank Doug Baer, Shridhar Deuskar, Lisa Guinn, Terry Lyons, Aaron Miller, Alket Memushaj, Owen Thomas, Brian Watrous, and Alton Yu for building this exceptional lab.

If you don’t have gear to try this out on or if you want more lab opportunities, a similar lab is in the works for VMworld EMEA (Cannes, February 24-26). For Technology Exchange (Orlando, April 14-17), we’re looking into doing a lab focused more on professional-developers that covers the VI SDK using Java and C#.

Enjoy!

PS. I’d like to point out that the code here is designed to teach concepts, not to be “enterprise ready”. Things like error checking have been kept to a minimum so concepts covered in each exercise are as easy as possible to understand. The lawyers have asked that I inform you that the sample code is provided "AS-IS" for use, modification, and redistribution in source and binary forms, provided that the copyright notice and this following list of conditions are retained and/or reproduced in your distribution. To the maximum extent permitted by law, VMware, Inc., its subsidiaries and affiliates hereby disclaim all express, implied and/or statutory warranties, including duties or conditions of merchantability, fitness for a particular purpose, and non-infringement of intellectual property rights. IN NO EVENT WILL VMWARE, ITS SUBSIDIARIES OR AFFILIATES BE LIABLE TO ANY OTHER PARTY FOR THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES, ARISING OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THE SAMPLE CODE.

You agree to defend, indemnify and hold harmless VMware, and any of its directors, officers, employees, agents, affiliates, or subsidiaries from and against all losses, damages, costs and liabilities arising from your use, modification and distribution of the sample code.

VMware does not certify or endorse your use of the sample code, nor is any support or other service provided in connection with the sample code.

4 Comments Permalink

Developer Center Blog

VMware Developer Blog provides content for the VMware Developer Community.

Communities