The VIX API Reference guide includes function reference pages for C++, Perl, and COM (component object model) for Microsoft C#, VBScript, and Visual Basic. Most reference pages include helpful code examples. Additionally, the
vix-api Web guide includes examples for power on and off, suspending a virtual machine, taking a snapshot, guest operations, virtual machine discovery, and asynchronous callbacks.
Suppose you want to run the antivirus software presented in Scan VMDK for Virus Signatures for all virtual machines hosted on a VMware Workstation. Here is the high-level algorithm for an VIX-based application that would scan hosted disk on all virtual machines.
Your callback function must be similar to the VixDiscoveryProc() callback function shown as an example on the
VixHost_FindItems() page in the
VIX API Reference Guide.
The Developer’s Setup Guide for the VMware vSphere WS SDK has a chapter describing how to set up your programming environment for Microsoft C# or Java. Some of the information applies to C++ also.
The Programming Guide for the vSphere SDK contains some sample code written in Microsoft C# but most examples are written in Java, and based on the JAX-WS development framework.
Suppose you want to run the antivirus software presented in Scan VMDK for Virus Signatures for all virtual machines hosted on an ESX/ESXi host. Here is the high-level algorithm for a VMware vSphere solution that can scan managed disk on all virtual machines.
If you are interested, navigate to VMware Infrastructure SDK on the Web and click VI API Reference Guide for the 2.5 version or
VMware vSphere WS API Reference Guide for the 4.0 version. Click All Types, search for
VirtualDiskManager, and follow its link.