How virtualization technology shutdown the OS?












1















I search something about this question just like KVM, ACPI etc.

I guess that OS implement some interface (like ACPI?), it can receive some kind of signal or command and shutdown itself.

And the host through virtualization technology send a signal or command to OS of instance.



My understanding is right? Can someone give me a direction, thx.










share|improve this question



























    1















    I search something about this question just like KVM, ACPI etc.

    I guess that OS implement some interface (like ACPI?), it can receive some kind of signal or command and shutdown itself.

    And the host through virtualization technology send a signal or command to OS of instance.



    My understanding is right? Can someone give me a direction, thx.










    share|improve this question

























      1












      1








      1








      I search something about this question just like KVM, ACPI etc.

      I guess that OS implement some interface (like ACPI?), it can receive some kind of signal or command and shutdown itself.

      And the host through virtualization technology send a signal or command to OS of instance.



      My understanding is right? Can someone give me a direction, thx.










      share|improve this question














      I search something about this question just like KVM, ACPI etc.

      I guess that OS implement some interface (like ACPI?), it can receive some kind of signal or command and shutdown itself.

      And the host through virtualization technology send a signal or command to OS of instance.



      My understanding is right? Can someone give me a direction, thx.







      virtualization kvm acpi






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 6:36









      FredFred

      217




      217
























          1 Answer
          1






          active

          oldest

          votes


















          2














          It happens approximately as this.




          1. The VMM (virtual machine monitor) supplies a guest BIOS/UEFI image which, when run inside a virtual machine, populates in-memory ACPI descriptions.

          2. The guest OS reads these ACPI tables and among others finds a description of a button device that corresponds to a power button. It reads which resources are assigned to that button, in particular, how the button is supposed to signal its state. Most commonly, it will be an interrupt with a certain numer and addresses of register(s) used to tell multiple buttons apart.

          3. When a VMM user/admin decides to press a virtual power button, it uses a VMM-specific interface (GUI, CMD-line, script etc.) to command the VMM to do that. The VMM then sets up registers and injects the previously negotiated interrupt number to the guest OS.

          4. It is now the target OS responsibility to react to the signal. From its standpoint, it looked like a real power button was pressed. The guest OS then shuts down individual processes, flushes disk caches and finally uses a platform-specific device access to command the virtual hardware to shut down the power (alternatively, go to hibernate, S5 state, HLT state, reboot etc.) The target OS may well ignore the button press if there is no guest software installed to propagate it to the OS, i.e. Ubuntu without acpi-tools package.






          share|improve this answer



















          • 1





            Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

            – Fred
            Nov 19 '18 at 6:17








          • 1





            Fred, if this answers your question, please mark the answer as accepted (green check mark).

            – prl
            Nov 20 '18 at 0:30











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313724%2fhow-virtualization-technology-shutdown-the-os%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          It happens approximately as this.




          1. The VMM (virtual machine monitor) supplies a guest BIOS/UEFI image which, when run inside a virtual machine, populates in-memory ACPI descriptions.

          2. The guest OS reads these ACPI tables and among others finds a description of a button device that corresponds to a power button. It reads which resources are assigned to that button, in particular, how the button is supposed to signal its state. Most commonly, it will be an interrupt with a certain numer and addresses of register(s) used to tell multiple buttons apart.

          3. When a VMM user/admin decides to press a virtual power button, it uses a VMM-specific interface (GUI, CMD-line, script etc.) to command the VMM to do that. The VMM then sets up registers and injects the previously negotiated interrupt number to the guest OS.

          4. It is now the target OS responsibility to react to the signal. From its standpoint, it looked like a real power button was pressed. The guest OS then shuts down individual processes, flushes disk caches and finally uses a platform-specific device access to command the virtual hardware to shut down the power (alternatively, go to hibernate, S5 state, HLT state, reboot etc.) The target OS may well ignore the button press if there is no guest software installed to propagate it to the OS, i.e. Ubuntu without acpi-tools package.






          share|improve this answer



















          • 1





            Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

            – Fred
            Nov 19 '18 at 6:17








          • 1





            Fred, if this answers your question, please mark the answer as accepted (green check mark).

            – prl
            Nov 20 '18 at 0:30
















          2














          It happens approximately as this.




          1. The VMM (virtual machine monitor) supplies a guest BIOS/UEFI image which, when run inside a virtual machine, populates in-memory ACPI descriptions.

          2. The guest OS reads these ACPI tables and among others finds a description of a button device that corresponds to a power button. It reads which resources are assigned to that button, in particular, how the button is supposed to signal its state. Most commonly, it will be an interrupt with a certain numer and addresses of register(s) used to tell multiple buttons apart.

          3. When a VMM user/admin decides to press a virtual power button, it uses a VMM-specific interface (GUI, CMD-line, script etc.) to command the VMM to do that. The VMM then sets up registers and injects the previously negotiated interrupt number to the guest OS.

          4. It is now the target OS responsibility to react to the signal. From its standpoint, it looked like a real power button was pressed. The guest OS then shuts down individual processes, flushes disk caches and finally uses a platform-specific device access to command the virtual hardware to shut down the power (alternatively, go to hibernate, S5 state, HLT state, reboot etc.) The target OS may well ignore the button press if there is no guest software installed to propagate it to the OS, i.e. Ubuntu without acpi-tools package.






          share|improve this answer



















          • 1





            Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

            – Fred
            Nov 19 '18 at 6:17








          • 1





            Fred, if this answers your question, please mark the answer as accepted (green check mark).

            – prl
            Nov 20 '18 at 0:30














          2












          2








          2







          It happens approximately as this.




          1. The VMM (virtual machine monitor) supplies a guest BIOS/UEFI image which, when run inside a virtual machine, populates in-memory ACPI descriptions.

          2. The guest OS reads these ACPI tables and among others finds a description of a button device that corresponds to a power button. It reads which resources are assigned to that button, in particular, how the button is supposed to signal its state. Most commonly, it will be an interrupt with a certain numer and addresses of register(s) used to tell multiple buttons apart.

          3. When a VMM user/admin decides to press a virtual power button, it uses a VMM-specific interface (GUI, CMD-line, script etc.) to command the VMM to do that. The VMM then sets up registers and injects the previously negotiated interrupt number to the guest OS.

          4. It is now the target OS responsibility to react to the signal. From its standpoint, it looked like a real power button was pressed. The guest OS then shuts down individual processes, flushes disk caches and finally uses a platform-specific device access to command the virtual hardware to shut down the power (alternatively, go to hibernate, S5 state, HLT state, reboot etc.) The target OS may well ignore the button press if there is no guest software installed to propagate it to the OS, i.e. Ubuntu without acpi-tools package.






          share|improve this answer













          It happens approximately as this.




          1. The VMM (virtual machine monitor) supplies a guest BIOS/UEFI image which, when run inside a virtual machine, populates in-memory ACPI descriptions.

          2. The guest OS reads these ACPI tables and among others finds a description of a button device that corresponds to a power button. It reads which resources are assigned to that button, in particular, how the button is supposed to signal its state. Most commonly, it will be an interrupt with a certain numer and addresses of register(s) used to tell multiple buttons apart.

          3. When a VMM user/admin decides to press a virtual power button, it uses a VMM-specific interface (GUI, CMD-line, script etc.) to command the VMM to do that. The VMM then sets up registers and injects the previously negotiated interrupt number to the guest OS.

          4. It is now the target OS responsibility to react to the signal. From its standpoint, it looked like a real power button was pressed. The guest OS then shuts down individual processes, flushes disk caches and finally uses a platform-specific device access to command the virtual hardware to shut down the power (alternatively, go to hibernate, S5 state, HLT state, reboot etc.) The target OS may well ignore the button press if there is no guest software installed to propagate it to the OS, i.e. Ubuntu without acpi-tools package.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 15 '18 at 18:10









          Grigory RechistovGrigory Rechistov

          1,338917




          1,338917








          • 1





            Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

            – Fred
            Nov 19 '18 at 6:17








          • 1





            Fred, if this answers your question, please mark the answer as accepted (green check mark).

            – prl
            Nov 20 '18 at 0:30














          • 1





            Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

            – Fred
            Nov 19 '18 at 6:17








          • 1





            Fred, if this answers your question, please mark the answer as accepted (green check mark).

            – prl
            Nov 20 '18 at 0:30








          1




          1





          Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

          – Fred
          Nov 19 '18 at 6:17







          Thank you for your excellent answer that solved my puzzle, and I will find some article about device-description-table for learning more.

          – Fred
          Nov 19 '18 at 6:17






          1




          1





          Fred, if this answers your question, please mark the answer as accepted (green check mark).

          – prl
          Nov 20 '18 at 0:30





          Fred, if this answers your question, please mark the answer as accepted (green check mark).

          – prl
          Nov 20 '18 at 0:30




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313724%2fhow-virtualization-technology-shutdown-the-os%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Florida Star v. B. J. F.

          Danny Elfman

          Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues