- Published on
VMware ESXCLI
- Authors
- Name
- Jackson Chen
Useful ESXCLI Commands
https://www.nakivo.com/blog/most-useful-esxcli-esxi-shell-commands-vmware-environment/
vim-cmd useful commands
Access vsphere DCUI and access vSphere shell console
# List all VMs in the ESXi host
vim-cmd vmsvc/getallvms
# It will list VM's vm-id
# Get VM running state by using the VM-id
vim-cmd vmsvc/power.getstate <vm-id>
# To gracefully shutdown the VM
vim-cmd vmsvc/power.shutdown <vm-id>
# To forcely power off the vm - unplug the power
vim-cmd vmsvc/power.ff <vm-id> # Only when fail to perperly shutdown VM