VMware Cloud Community
mozzie
Enthusiast
Enthusiast

Disable Power Button?

Hi

Is it possible to prevent ESXi from shutting down if the power button on a server/workstation is pressed?

You can do this easily enough on a physical Windows box but cannot see this setting in vsphere/esxi.

Thanks.

Reply
0 Kudos
9 Replies
Najd
Contributor
Contributor

In order to shutdown the host u have to shutdown the VM first but anyway the power button on a host runs the /sbin/poweroff command, so you can look at the /sbin/shutdown.sh file to see if you can script this process. There is more information on this here: http://superuser.com/questions/431859/how-do-i-make-esxi-5-0-to-shutdown-virtual-machines-when-the-p...

Best regards and hope that helped

Reply
0 Kudos
mozzie
Enthusiast
Enthusiast

I want to disable the power button from shutting down the host, not modify the shutdown script.

Seems it can't be done.

Reply
0 Kudos
Linjo
Leadership
Leadership

This is usually a function of the hardware, on my server I can configure in the BIOS what should happen when I press the power-button.

So I guess its up to the hardware what is available to configure, but have a look in the BIOS settings and see if there are any options there.

Best regards, Linjo Please follow me on twitter: @viewgeek If you find this information useful, please award points for "correct" or "helpful".
Reply
0 Kudos
JarryG
Expert
Expert

I *think* /sbin/shutdown.sh is called when you press power-button (I mean short-press). So try to wipe this script out (rename the old one and create new, empty one) and you will see. I strongly recommend you create snapshots (or full backups) of your VMs first! *If* this works and nothing happens, then the last thing you have to take care about is auto-creating this empty script (/sbin/shutdown.sh) after each boot-up, because it does not persist throught restart.


Apart from this, there is "long-press" (press and hold power-button for a few seconds), and that is really bios-thing. It has nothing to do with system installed...

_____________________________________________ 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! 😉
Reply
0 Kudos
Najd
Contributor
Contributor

It can be done if your hardware support it , go to your Bios and search for power option and disable it . other wise you cant do that .

best regards

Reply
0 Kudos
Jimzamjimmyy
Contributor
Contributor

I just disconnected the power button from the motherboard. You can check from your motherboard manual it that is possible on your configuration

Reply
0 Kudos
nparas5
Enthusiast
Enthusiast

Not Sure why you want to disable but this should never be an option rather than a workaround. How would you power on a host physically assume after power outage at DCs? Power Button is required many times to hard reset host when its hung from GUI and SSH, Power Button is required when you perform hardware troubleshooting/installation.

From Data center perspective this question is not possible not because H/W vendors can't do it but this is an important requirement . For security point of view that's why Data Centers are secured and isolated places where servers are kept in locked racks..

Reply
0 Kudos
Jimzamjimmyy
Contributor
Contributor

Some motherboards have this feature that they boot automatically when the power is restored and server motherboards can be rebooted over network.

Reply
0 Kudos
rlund
Enthusiast
Enthusiast

Give us the server model and we can perhaps help you see if the bios allows for you to disable it

Roger Lund Minnesota VMUG leader Blogger VMware and IT Evangelist My Blog: http://itblog.rogerlund.net & http://www.vbrainstorm.com
Reply
0 Kudos