I found codes for VM Power Ops in the SDK package.
What are they meant for?
Are they codes to manage virtual machines such as Power On & Power Off the VM?
Thanks in advance for future replies.
Yep, you'll find that everything you can do in the VI Client can be accomplished through the VI API
Power On VM - PowerOnVM_Task() http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.VirtualMachine.html#po...
Power Off VM - PowerOffVM_Task() http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.VirtualMachine.html#po...
Suspend VM - SuspendVM_Task() http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.VirtualMachine.html#su...
If you're interested in other operations take a look at a script that provides some of the basic VM operations vmcontrol.pl http://www.vmware.com/support/developer/viperltoolkit/viperl15/doc/vmcontrol.html and you can look in the Perl script to see how the VI API is being used
Here is a list of other scripts that is part of the VI Perl Toolkit:
VMware vExpert 2009
If you find this information useful, please award points for "correct" or "helpful".
Yes you referred to the correct sample code, it does provide the functionality to perform Power operations on Virtual machine. As mentionned by William, this utility uses following api calls to perform various operations that can be performed using VI Clinet and vmcontrol.pl
PowerOffVM_Task - off
PowerOnVM_Task - on
SuspendVM_Task - suspend
ResetVM_Task - reset
RebootGuest - reboot guest.