Behavior of QEMU as hypervisor

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












According to official QEMU documentation:




When used as a virtualizer, QEMU achieves near native performance by executing the guest code directly on the host CPU.




My question is how is this behavior different from the programs we call hypervisors (e.g. VirtualBox, KVM etc); don't they also run the "guest code" on the "host CPU"? where else would they run it on?



Update:



If the image below (source) is correct, then it turns out that QEMU runs applications (and not entire OSs like hypervisors) but performs translations between different architecture types (e.g. a program written for ARM can run on x86)



enter image description here



Given the above, is the case that for one to run:



a) an entire operating system for a specific architecture (e.g ARM)



b) on a host with a different architecture (e.g amd64)



a co existence is needed of both



QEMU (to perform the cross-architecture mapping)



and



KVM (to act as hardware hypervisor)



is needed?







share|improve this question


























    up vote
    2
    down vote

    favorite












    According to official QEMU documentation:




    When used as a virtualizer, QEMU achieves near native performance by executing the guest code directly on the host CPU.




    My question is how is this behavior different from the programs we call hypervisors (e.g. VirtualBox, KVM etc); don't they also run the "guest code" on the "host CPU"? where else would they run it on?



    Update:



    If the image below (source) is correct, then it turns out that QEMU runs applications (and not entire OSs like hypervisors) but performs translations between different architecture types (e.g. a program written for ARM can run on x86)



    enter image description here



    Given the above, is the case that for one to run:



    a) an entire operating system for a specific architecture (e.g ARM)



    b) on a host with a different architecture (e.g amd64)



    a co existence is needed of both



    QEMU (to perform the cross-architecture mapping)



    and



    KVM (to act as hardware hypervisor)



    is needed?







    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      According to official QEMU documentation:




      When used as a virtualizer, QEMU achieves near native performance by executing the guest code directly on the host CPU.




      My question is how is this behavior different from the programs we call hypervisors (e.g. VirtualBox, KVM etc); don't they also run the "guest code" on the "host CPU"? where else would they run it on?



      Update:



      If the image below (source) is correct, then it turns out that QEMU runs applications (and not entire OSs like hypervisors) but performs translations between different architecture types (e.g. a program written for ARM can run on x86)



      enter image description here



      Given the above, is the case that for one to run:



      a) an entire operating system for a specific architecture (e.g ARM)



      b) on a host with a different architecture (e.g amd64)



      a co existence is needed of both



      QEMU (to perform the cross-architecture mapping)



      and



      KVM (to act as hardware hypervisor)



      is needed?







      share|improve this question














      According to official QEMU documentation:




      When used as a virtualizer, QEMU achieves near native performance by executing the guest code directly on the host CPU.




      My question is how is this behavior different from the programs we call hypervisors (e.g. VirtualBox, KVM etc); don't they also run the "guest code" on the "host CPU"? where else would they run it on?



      Update:



      If the image below (source) is correct, then it turns out that QEMU runs applications (and not entire OSs like hypervisors) but performs translations between different architecture types (e.g. a program written for ARM can run on x86)



      enter image description here



      Given the above, is the case that for one to run:



      a) an entire operating system for a specific architecture (e.g ARM)



      b) on a host with a different architecture (e.g amd64)



      a co existence is needed of both



      QEMU (to perform the cross-architecture mapping)



      and



      KVM (to act as hardware hypervisor)



      is needed?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 25 at 9:23

























      asked Aug 25 at 9:03









      pkaramol

      322112




      322112




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          The paragraph you quote should be contrasted with the previous paragraph in the documentation:




          When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.




          The documentation is highlighting the difference between QEMU used as an emulator, which is slower because it involves translating binary code, versus QEMU used as a virtualiser.



          Regarding the diagram, it’s incomplete. QEMU is very versatile and can be used on its own to emulate a full system, running a guest OS, or virtualise a full system, again running a guest OS, or emulate or virtualise a CPU within the host OS, running a guest application only. It can also be used to emulate devices for use with KVM.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464769%2fbehavior-of-qemu-as-hypervisor%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            The paragraph you quote should be contrasted with the previous paragraph in the documentation:




            When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.




            The documentation is highlighting the difference between QEMU used as an emulator, which is slower because it involves translating binary code, versus QEMU used as a virtualiser.



            Regarding the diagram, it’s incomplete. QEMU is very versatile and can be used on its own to emulate a full system, running a guest OS, or virtualise a full system, again running a guest OS, or emulate or virtualise a CPU within the host OS, running a guest application only. It can also be used to emulate devices for use with KVM.






            share|improve this answer
























              up vote
              5
              down vote



              accepted










              The paragraph you quote should be contrasted with the previous paragraph in the documentation:




              When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.




              The documentation is highlighting the difference between QEMU used as an emulator, which is slower because it involves translating binary code, versus QEMU used as a virtualiser.



              Regarding the diagram, it’s incomplete. QEMU is very versatile and can be used on its own to emulate a full system, running a guest OS, or virtualise a full system, again running a guest OS, or emulate or virtualise a CPU within the host OS, running a guest application only. It can also be used to emulate devices for use with KVM.






              share|improve this answer






















                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                The paragraph you quote should be contrasted with the previous paragraph in the documentation:




                When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.




                The documentation is highlighting the difference between QEMU used as an emulator, which is slower because it involves translating binary code, versus QEMU used as a virtualiser.



                Regarding the diagram, it’s incomplete. QEMU is very versatile and can be used on its own to emulate a full system, running a guest OS, or virtualise a full system, again running a guest OS, or emulate or virtualise a CPU within the host OS, running a guest application only. It can also be used to emulate devices for use with KVM.






                share|improve this answer












                The paragraph you quote should be contrasted with the previous paragraph in the documentation:




                When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.




                The documentation is highlighting the difference between QEMU used as an emulator, which is slower because it involves translating binary code, versus QEMU used as a virtualiser.



                Regarding the diagram, it’s incomplete. QEMU is very versatile and can be used on its own to emulate a full system, running a guest OS, or virtualise a full system, again running a guest OS, or emulate or virtualise a CPU within the host OS, running a guest application only. It can also be used to emulate devices for use with KVM.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 25 at 10:12









                Stephen Kitt

                143k22312377




                143k22312377



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464769%2fbehavior-of-qemu-as-hypervisor%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    這個網誌中的熱門文章

                    How to combine Bézier curves to a surface?

                    Carbon dioxide

                    Why am i infinitely getting the same tweet with the Twitter Search API?