Using the ESXi command-line utility vim-cmd to power off the virtual machine

Tanakorn Piamsin
Jan 23, 2017 · 1 min read
  1. On the ESXi console, enter Tech Support mode and log in as root. For more information, see Tech Support Mode for Emergency Support (1003677).
  2. Get a list of all registered virtual machines, identified by their VMID, Display Name, and path to the .vmx configuration file by running this command:
  3. vim-cmd vmsvc/getallvms
  4. Get the current state of a virtual machine by running this command:
  5. vim-cmd vmsvc/power.getstate VMID
  6. Shutdown the virtual machine using the VMID found in Step 2 and run this command:
  7. vim-cmd vmsvc/power.shutdown VMID
  8. Note: If the virtual machine fails to shut down, run this command:
  9. vim-cmd vmsvc/power.off VMID

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade