Our Sponsors

CMD – VMware-cmd

vmware-cmd –l

List path and names of .registered VM vmx files on the present host

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx getstate

Retrieve power state of the VM: off, on, suspended, stuck

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx reset trysoft

Reboot the VM. First try a nice shutdown, then if necessary force a shutdown before reboot 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx start

Power on the VM 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx stop trysoft
vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx stop hard

Shutdown/halt the VM. First try a nice shutdown, and then if necessary force a shutdown. Finally power off. 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx suspend

Suspend the VM 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx hassnapshot

Query if VM has a snapshot 

vmware-cmd createsnapshot name description quiesce memory

Quiesce will quiesce file system writes

Memory will grab the memory state (will lose pings during this) 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx revertsnapshot

Revert to previous created snapshot (you loose the current VM state!) 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx removesnapshots

Remove previous created snapshots (you keep the current VM state!) 

vmware-cmd -s register /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx

Register VM (add to inventory) 

vmware-cmd -s unregister /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx

 Unregister VM (add to inventory) 

vmware-cmd /esxvmfs001/volume/vmfslabel/VMName/VMName.vmx answer

 Answer pending request for userinput