VMware

VMware Virtual Infrastructure SDK 2.x FAQs

What is the VMware Virtual Infrastructure SDK?
The VMware Virtual Infrastructure SDK comprises the VirtualCenter Web service interface along with a development kit containing a WSDL file, documentation, and sample code. This SDK enables your program or framework to invoke VirtualCenter Web service interface functions on VirtualCenter or ESX Server to manage and control ESX Servers. VMware recommends the VMware Virtual Infrastructure SDK for access to the widest range of services.

Customers and partners that want to write programs that use the VirtualCenter Web service should download the VMware Virtual Infrastructure SDK package. This package contains interface definitions, detailed documentation and sample code.

What is the difference between the 1.x releases and the 2.x releases of the SDK?
For complete details, consult the VMware Infrastructure SDK Release Notes for VMware SDK 2.0. Major changes in Release 2 include:

  • A revised interface built on a fully encapsulated object model.
  • A common interface for accessing VirtualCenter or ESX Servers.
  • VirtualCenter has expanded functionality.
  • Full support for host configuration.
  • An option ("1.x compatibility mode") that allows applications built on SDK 1.x to run in VirtualCenter 2.0. See the compatibility notes for issues you may need to address.

How do I get the SDK package?
The SDK package file is available here.

Does the SDK package need to be executed on the same machine as the Web service?
No. The SDK package is for developers writing programs that use the Web service interface. It can be used on any system, and can even be deployed in a Virtual Machine. The only requirement is that the system must have network access to the Web service.

Can I use VMware sample code in my own programs?
You are free to create derivative works of the sample code, but VMware does not support the sample code and makes it available on an "as-is" basis.

What is a Web services toolkit?
According to W3C, "Web services provide a standard means of interoperating between different software applications, running on a variety of platforms and/or frameworks." A Web services toolkit provides the necessary components to enable that interoperation, in one or more programming languages.

What programming language and Web services toolkit should I use to access the VirtualCenter Web service?
One of the advantages of Web services is that they are language-agnostic; any programming language may be used to access the interface. In practice, an adequate Web services toolkit must be available. The SDK package includes sample code in Java using the Axis toolkit, and in C# and Visual Basic using Visual Studio .NET. However, developers are free to use any language and toolkit that they choose.

They use a WSDL proxy generator tool to generate the stubs (proxy code) appropriate to their chosen language environment. The stubs are the routines in the language of their choice that use WSDL to communicate with the Web service. Available toolkits include:

LanguageToolkitToolkit Location
C#, C++, or
Visual Basic
.NET Framework (version 1.1 and 2.0)/
Visual Studio 2003 and 2005
http://msdn.microsoft.com/downloads/
Java Apache Axis (version 1.2.1 or 1.4) http://ws.apache.org/axis/

How do I generate proxy code for Microsoft Visual Studio .NET?
Microsoft Visual Studio .NET includes a Web Services Description Language Tool (wsdl.exe) that can generate proxy code to enable .NET programmers to interface with the Web service.

What is the relationship between the VMware Virtual Infrastructure SDK and the Perl and COM APIs available for ESX Server and VMware Server?
VMware supports the Scripting API to provide legacy Perl and COM scripting interfaces to ESX Server. Version 2.3 of these interfaces is implemented using the Virtual Infrastructure SDK but provides only a subset of the functionality provided by the SDK.

How often does the VMware Virtual Infrastructure SDK change?
The VirtualCenter Web service is part of VirtualCenter, so new versions of the Web service will be released whenever that product is released. Changes in the ESX Server or the VMware Server could also cause changes in the SDK. While the features and functionality of the Web service will evolve, every effort will be made to maintain backwards compatibility. New versions of the SDK package, on the other hand, are not tied to releases of VirtualCenter or to any other VMware product.

To make sure that you have all the latest tools and samples, it is a good idea to check the VMware Web site on a regular basis.

How do I get information about installing and running the VirtualCenter Web service?
The VirtualCenter Installation and Upgrade Guide documents how to install the VirtualCenter Web service and verify that it is operating correctly. See also the "Developing Client Applications" chapter of the VMware Infrastructure SDK Programming Guide. In addition, a FAQ that describes using the Web service is available here.

What is the best sample application that I can try to run to verify that I have configured my environment correctly?
The Managed Object Browser is a Web site, available on both individual ESX Server hosts and VirtualCenter, that lets you examine server objects, properties, and values. Accessing it will verify that your basic environment is in place. The VMware Infrastructure SDK Programming Guide devotes a chapter to the Managed Object Browser.

Are there configuration parameters that I must set on VirtualCenter or on ESX Server to enable the Web service?
If you want to use HTTPS, there's no need to make any changes. If (in a test or development environment) you want to use HTTP, see the chapter "Developing Client Applications" in the VMware Infrastructure SDK Programming Guide for information about configuring for the non-SSL protocol.

Can I use the Web service with an ESX Server 2.x host?
Yes, but only through VirtualCenter 2.0.

I just downloaded the SDK. What are the first steps that I should take before I write an application?
The information is all in the Virtual Infrastructure SDK Programming Guide, in the chapter on developing client applications. In short:

  • You must have a toolkit–that is, a Web Services Development Environment (WSDE)–in place.
  • The SDK must be in a directory that has no spaces its name.
  • The SDKHOME variable must be set to the path to the directory that contains the VMware Infrastructure SDK, such as C:\apps\VMware\SDK.
  • Generate and compile the stub files. For information on that step, see the appropriate section of the programming guide, depending on your selected WSDE.
  • Before you can compile and run code, you must configure the protocol for accessing the VMware Infrastructure SDK Web service. The URL for accessing the VMware Infrastructure SDK Web service is:
    https://<server_name_or_ip_address>/sdk
    and you must configure the client appropriately.
  • To invoke operations using the HTTP protocol, you must enable the appropriate server, as explained in the programming guide.
Once you have completed these steps, you can write applications. Also see the information in the Programming Guide about how to write a simple client application.

What are the steps that I perform to compile the sample applications?
To compile any Java application, add the directory of the source program to the CLASSPATH variable, and compile the source using javac. To run it, type java <applicationName>.