Reading Time: < 1 minuteAs 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.
Related Posts
-
ESXi - Alternative al comando vmware-cmdCome molti sapranno o avranno notato, nei nuovi ESXi molti dei comandi della vecchia service console sono spariti, sia perché la nuova console (ESXi shell o TSM technical support mode console) è minimale, sia perché molti sono confluiti nel nuovo comando esxcli di ESXi 5.…
-
ESXi Installable vs. ESXi EmbeddedESXi is the unified version of the VMware hypervisor, but it could be installed on a host in different way: Embedded: is a OEM version usually shipped with the host Installable: is the one available from the VMware download site PXE: is used in the…
-
Critical security patch for VMware ESXi 6.xRecently VMware has released a few security patches that will prevent a guest from execute code on the ESXi host and breaking the isolation of a virtual machine. This has been possible based on heap buffer overflow and uninitialized stack memory usage in SVGA, using…
Virtualization, Cloud and Storage Architect. Tech Field delegate.
VMUG IT Co-Founder and board member. VMware VMTN Moderator and vExpert 2010-24. Dell TechCenter Rockstar 2014-15. Microsoft MVP 2014-16. Veeam Vanguard 2015-23. Nutanix NTC 2014-20.
Several certifications including: VCDX-DCV, VCP-DCV/DT/Cloud, VCAP-DCA/DCD/CIA/CID/DTA/DTD, MCSA, MCSE, MCITP, CCA, NPP.