VMware

Virtual Center

Java Sample Code

StorageEventsMonitor.java Example script to monitor the storage related events(Datastore related) on a Virtual Center.
CreateVMWithThinProvisionedDisk.java Create a VM with Thin Provisioned disk
DatastoreInfo.java Retrieves the basic Datastore Information.
CreateVMWithMultipleDisk.java Create a VM with multiple Disks
GetLicenseInfo.java Display the License information related to features whose keys are esxfull, esxExpress, drs, vmotion
HideNxFlag.java Hide the NX flag from Guest
QueryEvent.java Demonstrates how to use CreateCollectorForEvents and EventFilterSpec in the API to get filtered events
CreateVMStaticMACAddress.java Creates a VM with static MAC address


Perl Sample Code

exsnpfilename.pl Filename information of a VM snapshot for VMware ESX
exlistcpucntperf.pl Retrieve all cpu counters for all instances of CPU in VMware ESX
exclonewithcpushare.pl Clones a VM while setting the CPU Shares while cloning
exdsfilesize.pl Browse a datastore and display the file size
exmultipathinfo.pl Multipath Information for Storage Devices
exlistcpucntperf.pl Retrieve all cpu counters for all instances of CPU in VMware ESX

C# Sample Code

CloneVM.cs Clone a VM from VM/Template

ESX

Java Sample Code

CreateVmfsDatastore.java Example script to create VmfsDatastore
VMEventsMonitor.java Example script to Monitoring VM related events.
VMReconfig.java Example script to configures a virtual machine which includes reconfiguring the disk size,disk mode etc.
CreateVMWithThinProvisionedDisk.java Create a VM with Thin Provisioned disk
DatastoreInfo.java Retrieves the basic Datastore Information.
CreateVMWithMultipleDisk.java Create a VM with multiple Disks
GetLicenseInfo.java Display the License information related to features whose keys are esxfull, esxExpress, drs, vmotion
HideNxFlag.java Hide the NX flag from Guest
QueryEvent.java Demonstrates how to use CreateCollectorForEvents and EventFilterSpec in the API to get filtered events
CreateVMStaticMACAddress.java Creates a VM with static MAC address

Perl Sample Code

exsnpfilename.pl Filename information of a VM snapshot for ESX
exlistcpucntperf.pl Retrieve all cpu counters for all instances of CPU in ESX
exclonewithcpushare.pl Clones a VM while setting the CPU Shares while cloning
exdsfilesize.pl Browse a datastore and display the file size
exmultipathinfo.pl Multipath Information for Storage Devices
exlistcpucntperf.pl Retrieve all cpu counters for all instances of CPU in ESX
VMBootOrder.plThis script allows users to set the boot preference for a virtual machine.