As you know, several commands from local CLI (via the ESXi shell or TSM technical support mode) are changed in latest version of ESXi (in the new ESXi 5 most are replaced by the new esxcli command). One command that was alredy replaced in ESXi 4.1 was the vmware-cmd command. A new vim-cmd must be used instead (as as described by William Lam in VMware vimsh and vim-cmd). The typical use of vmware-cmd command was get/change the state of a VM and register a VM.
About the state of a VM, the VMware KB1014165 (Powering off a virtual machine on an ESXi host) explain the new command syntax and usage.
To get the list of the VMs and they unique indentifier (VMID):
- Previous command:
vmware-cmd -l
- New command:
vim-cmd vmsvc/getallvms
To get the state of a VM:
- Previous command:
vmware-cmd VMX_Path
getstate
- New command:
vim-cmd vmsvc/power.getstate VMID
To shutdown a VM (trying with a guest shutdown):
- Previous command:
vmware-cmd
VMX_Path
stop trysoft - New command:
vim-cmd vmsvc/
power.off
VMID trysoft
To register a VM:
- Previous command:
vmware-cmd
-s
VMX_File
- New command:
vim-cmd solo/registervm
VMX_File
Note that you can use VMID or also the entire name of your VMX file.