Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: How can i shutdown all running VMs on esxi through ssh ?

$
0
0

Hi Mohamed,

 

I don't have a finished script for you, but here are the commands that you need to use:

 

vim-cmd vmsvc/getallvms

(will list all registered VMs with their "vmid" in the first column)

 

vim-cmd vmsvc/power.getstate vmid

(get the power state of a VM)

 

vim-cmd vmsvc/power.shutdown vmid

(shut down a VM through VMware Tools)

 

vim-cmd vmsvc/power.off vmid

(power off a VM. Use this after a shutdown via VMTools was not successful)

 

I hope this helps

Andreas


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>