7 Replies Latest reply on Aug 5, 2019 5:12 PM by nparas5

    Disable Power Button?

    mozzie Enthusiast



      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.



        • 1. Re: Disable Power Button?
          Najd Novice

          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

          • 2. Re: Disable Power Button?
            mozzie Enthusiast

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

            Seems it can't be done.

            • 3. Re: Disable Power Button?
              Linjo Champion
              User Moderators

              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.

              • 4. Re: Disable Power Button?
                JarryG 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...

                • 5. Re: Disable Power Button?
                  Najd Novice

                  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

                  • 6. Re: Disable Power Button?
                    Jimzamjimmyy Lurker

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

                    • 7. Re: Disable Power Button?
                      nparas5 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..