Hi
for more please follow this link if not followed -http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/vmware-cmd.html
The first useful command is:
vmware-cmd -l
This lists out the location of all of the VMs’ .vmx files on the ESX server. This is very useful as you will need this when you run any of the vmware-cmd commands. As stated above the syntax for the command is:
vmware-cmd <options> <vm-cfg-path> <vm-action> <arguments>
Now onto a few of the commands, there are the ones that are pretty self explanatory,
Remove All VM Snapshots: vmware-cmd <cfg> removesnapshots
Check if VM has any Snapshots: vmware-cmd <cfg> hassnapshot
Create A Snapshot[note everything but the name is optional]: vmware-cmd <cfg> createsnapshot <nameofsnapshot> <descriptionofsnapshot> <quiesce> <memory>
Revert to the previous snapshot: vmware-cmd <cfg> revertsnapshot
Start a VM: vmware-cmd <cfg> start <powerop_mode>
Get the state of the VM: vmware-cmd <cfg> getstate
Those are some of the simple useful ones, now here are a few that are a little finicky.
Stopping a VM: vmware-cmd <cfg> stop <powerop_mode>
Resetting a VM: vmware-cmd <cfg> reset <powerop_mode>
Here the <powerop_mode> is the tricky option. There are three options:
Soft: VMware tools need to be installed and running, therefore there are many cases when this will not work!
Hard: Performs the operation no matter what
Trysoft: Trys a soft and if that fails proceeds to a Hard. This is the best one in my opinion
get/setconfig:
vmware-cmd <cfg> setconfig <variable> <value>
vmware-cmd <cfg> getconfig <variable>
Setting or getting a configuration is a bit confusing at first because it asks for a variable, where is this variable coming from!?!? Luckily its actually pretty simple, you can set/getconfig on any of the settings in the .vmx file. There unfortunately is an issue with ESX 3.x ; some of the parameters that you set, only get set if you reset the hostD service by entering: service mgmt-vmware restart . This really is only a workaround as running this command will reset all of the connections that the ESX server has with the VMs, and it does take some time for it to come back up.
_________________
Innovation distinguishes between a leader and a follower.