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-physical-power-butt
Best regards and hope that helped
I want to disable the power button from shutting down the host, not modify the shutdown script.
Seems it can't be done.
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.
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...
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 .
I just disconnected the power button from the motherboard. You can check from your motherboard manual it that is possible on your configuration
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..