VMware Cloud Community
JarryG
Expert
Expert

Clean VMs & ESXi shutdown on power-button?

I have vSphere-Hypervisor with a few virtual machines running. Is there any way to achieve "clean" shutdown (of all VMs and ESXi) after power-button is pressed?

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! :winking_face:
Reply
0 Kudos
4 Replies
weinstein5
Immortal
Immortal

Welcome to the Community - Not that I am aware of - the best way to power down a host is through the vSphere client - 

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
JarryG
Expert
Expert

That is bad news. Is there really no acpi-event parser in esxi? I'm shocked. vSphere-client does not help, I do not have it always with me...

Can I at least shutdown VMs and ESXi using ssh? Or "magic tcp/udp packet"? Or any other way, except for vSphere-client...

_____________________________________________ If you found my answer useful please do *not* mark it as "correct" or "helpful". It is hard to pretend being noob with all those points! :winking_face:
Reply
0 Kudos
jdubin
Contributor
Contributor

You can do this via SSH (or via the console).

First, make sure SSH and/or console access to the host has been enabled

     http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.migration.doc_50%2Fcos_upgrade_...

Then, this will tell you how to issue the shutdown command via the shell:

     http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101416...

Note that VMs must have the client tools package installed for a clean shutdown.

Reply
0 Kudos
admin
Immortal
Immortal

Hi   jdubin,

Welcome to the communites.

please find the below command hope will help you.

First of all you must list the ID of your VM’s

vim-cmd vmsvc/getallvms

then you can power off your VM’s:

vim-cmd vmsvc/power.off vmnumber

Then you can power on your vm’s after it’s done:

vim-cmd vmsvc/power.on vmnumber  .

"Life is never easy for those who dream"
Reply
0 Kudos