VMware Cloud Community
marcussf
Contributor
Contributor

'esxcli vm process kill -t soft' unclean shutdown

According to documentation the 'esxcli vm process kill -t soft -w <id>' command is supposed to shut down a vm gracefully. However, I have tried this with various vms running on 6.5 and 6.7 hosts. The result is that the respective vm is powered off immediately. The only thing in the vmware.log log file is:

  2020-11-23T13:11:09Z[+475.388]| vmx| W115: Caught signal 15 -- tid 2100182 (eip 0xd3ebec9248)

I.e. there's no 'VMX has left the building' log message.

So - how can I use esxcli to shut down the vm cleanly?

0 Kudos
2 Replies
ashilkrishnan
VMware Employee
VMware Employee

Hi @marcussf ,

Those are the available esxcli commands to shutdown a VM. Please try these commands:

1. Run this command to get the vmid:    vim-cmd vmsvc/getallvms |grep -i VMname                  ==> Replace VMname with actual VM name

2. Once you have the vmid from step.1, please run:  vim-cmd vmsvc/power.shutdown   vmid

Hope that helps

0 Kudos
marcussf
Contributor
Contributor

Thanks ashilkrishnan,

I forgot to mention that I had successfully used that command to shut down a vm cleanly, but as - to the best of my knowledge - this command cannot be executed remotely, I am afraid it does not solve my issue.

 

 

 
0 Kudos