KVM and Docker on single Ubuntu host?

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








up vote
0
down vote

favorite












I have a single home lab server that I use to run a few VM’s currently. I would like to start migrating to some container use but, will continue to need VM’s as well. So my question is could I run Ubuntu as my host OS, and then install and run KVM for my VM needs and Docker for my container needs.

Before I start moving things I’d like to know if they will coexist nicely on a single Ubuntu server.



Appreciate your thoughts!







share|improve this question





















  • Yes you can do that.
    – Stephen Rauch
    Jun 7 at 4:55










  • I have found no information that suggests any red flags or caution to attaining your goal. You may wish to read KVM, Docker.
    – xtrchessreal
    Jun 7 at 5:44






  • 1




    @xtrchessreal: Sounds like an answer. Would you please write one based on that comment? Thanks.
    – David Foerster
    Jun 7 at 10:40














up vote
0
down vote

favorite












I have a single home lab server that I use to run a few VM’s currently. I would like to start migrating to some container use but, will continue to need VM’s as well. So my question is could I run Ubuntu as my host OS, and then install and run KVM for my VM needs and Docker for my container needs.

Before I start moving things I’d like to know if they will coexist nicely on a single Ubuntu server.



Appreciate your thoughts!







share|improve this question





















  • Yes you can do that.
    – Stephen Rauch
    Jun 7 at 4:55










  • I have found no information that suggests any red flags or caution to attaining your goal. You may wish to read KVM, Docker.
    – xtrchessreal
    Jun 7 at 5:44






  • 1




    @xtrchessreal: Sounds like an answer. Would you please write one based on that comment? Thanks.
    – David Foerster
    Jun 7 at 10:40












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a single home lab server that I use to run a few VM’s currently. I would like to start migrating to some container use but, will continue to need VM’s as well. So my question is could I run Ubuntu as my host OS, and then install and run KVM for my VM needs and Docker for my container needs.

Before I start moving things I’d like to know if they will coexist nicely on a single Ubuntu server.



Appreciate your thoughts!







share|improve this question













I have a single home lab server that I use to run a few VM’s currently. I would like to start migrating to some container use but, will continue to need VM’s as well. So my question is could I run Ubuntu as my host OS, and then install and run KVM for my VM needs and Docker for my container needs.

Before I start moving things I’d like to know if they will coexist nicely on a single Ubuntu server.



Appreciate your thoughts!









share|improve this question












share|improve this question




share|improve this question








edited Jun 7 at 10:00









xtrchessreal

5711619




5711619









asked Jun 7 at 4:30









user838213

1




1











  • Yes you can do that.
    – Stephen Rauch
    Jun 7 at 4:55










  • I have found no information that suggests any red flags or caution to attaining your goal. You may wish to read KVM, Docker.
    – xtrchessreal
    Jun 7 at 5:44






  • 1




    @xtrchessreal: Sounds like an answer. Would you please write one based on that comment? Thanks.
    – David Foerster
    Jun 7 at 10:40
















  • Yes you can do that.
    – Stephen Rauch
    Jun 7 at 4:55










  • I have found no information that suggests any red flags or caution to attaining your goal. You may wish to read KVM, Docker.
    – xtrchessreal
    Jun 7 at 5:44






  • 1




    @xtrchessreal: Sounds like an answer. Would you please write one based on that comment? Thanks.
    – David Foerster
    Jun 7 at 10:40















Yes you can do that.
– Stephen Rauch
Jun 7 at 4:55




Yes you can do that.
– Stephen Rauch
Jun 7 at 4:55












I have found no information that suggests any red flags or caution to attaining your goal. You may wish to read KVM, Docker.
– xtrchessreal
Jun 7 at 5:44




I have found no information that suggests any red flags or caution to attaining your goal. You may wish to read KVM, Docker.
– xtrchessreal
Jun 7 at 5:44




1




1




@xtrchessreal: Sounds like an answer. Would you please write one based on that comment? Thanks.
– David Foerster
Jun 7 at 10:40




@xtrchessreal: Sounds like an answer. Would you please write one based on that comment? Thanks.
– David Foerster
Jun 7 at 10:40










2 Answers
2






active

oldest

votes

















up vote
1
down vote













Yes, KVM guests (e.g., Windows or OSX running in QEMU, using KVM) and Docker (e.g., Docker CE running containers) run fine all at the same time on the same Ubuntu instance.



Your question basically describes my workload. At this moment I'm running two Android emulators (using hardware virtualization acceleration, which is KVM on Linux), a Windows 10 QEMU guest, an OS X High Sierra QEMU guest, and Docker (installed via these instructions https://docs.docker.com/install/linux/docker-ce/ubuntu/) with their hello world example running, all at the same time on an Ubuntu 18.04 host.



The concise explanation why it works is that virtual machines (QEMU, etc) on Linux use a hypervisor (KVM in the case of QEMU, but Virtualbox and VMWare use different hypervisors) to use your computer's hardware resources, while Docker uses linux namespaces to simply use your currently running kernel's available hardware resources, but segregated from your main operating system.



In that way, KVM guests and Docker actually run using separate technologies and don't really even inter-relate to each other at the kernel level. This is in contrast to the case where you try to use different hypervisors (e.g., QEMU+KVM and VirtualBox) at the same time - that does not work as you can only run one type of hypervisor at a time (though you may run multiple VMs from each type of hypervisor).



There are great explanations of the technology details here: https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine






share|improve this answer




























    up vote
    0
    down vote













    I have found no information that suggests any red flags or caution to attaining your goal.



    I researched on this a bit and found that the kernel component of KVM was built into mainline Linux since 2.6.20 kernel, 18.04 LTS ships with 4.15 kernel. KVM is well integrated into Ubuntu 18.04 LTS.



    According to Docker for Ubuntu, Docker is optimized for bare bones servers and VMs.



    You can read more about KVM and Docker respectively.






    share|improve this answer





















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      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: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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%2faskubuntu.com%2fquestions%2f1044349%2fkvm-and-docker-on-single-ubuntu-host%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      Yes, KVM guests (e.g., Windows or OSX running in QEMU, using KVM) and Docker (e.g., Docker CE running containers) run fine all at the same time on the same Ubuntu instance.



      Your question basically describes my workload. At this moment I'm running two Android emulators (using hardware virtualization acceleration, which is KVM on Linux), a Windows 10 QEMU guest, an OS X High Sierra QEMU guest, and Docker (installed via these instructions https://docs.docker.com/install/linux/docker-ce/ubuntu/) with their hello world example running, all at the same time on an Ubuntu 18.04 host.



      The concise explanation why it works is that virtual machines (QEMU, etc) on Linux use a hypervisor (KVM in the case of QEMU, but Virtualbox and VMWare use different hypervisors) to use your computer's hardware resources, while Docker uses linux namespaces to simply use your currently running kernel's available hardware resources, but segregated from your main operating system.



      In that way, KVM guests and Docker actually run using separate technologies and don't really even inter-relate to each other at the kernel level. This is in contrast to the case where you try to use different hypervisors (e.g., QEMU+KVM and VirtualBox) at the same time - that does not work as you can only run one type of hypervisor at a time (though you may run multiple VMs from each type of hypervisor).



      There are great explanations of the technology details here: https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine






      share|improve this answer

























        up vote
        1
        down vote













        Yes, KVM guests (e.g., Windows or OSX running in QEMU, using KVM) and Docker (e.g., Docker CE running containers) run fine all at the same time on the same Ubuntu instance.



        Your question basically describes my workload. At this moment I'm running two Android emulators (using hardware virtualization acceleration, which is KVM on Linux), a Windows 10 QEMU guest, an OS X High Sierra QEMU guest, and Docker (installed via these instructions https://docs.docker.com/install/linux/docker-ce/ubuntu/) with their hello world example running, all at the same time on an Ubuntu 18.04 host.



        The concise explanation why it works is that virtual machines (QEMU, etc) on Linux use a hypervisor (KVM in the case of QEMU, but Virtualbox and VMWare use different hypervisors) to use your computer's hardware resources, while Docker uses linux namespaces to simply use your currently running kernel's available hardware resources, but segregated from your main operating system.



        In that way, KVM guests and Docker actually run using separate technologies and don't really even inter-relate to each other at the kernel level. This is in contrast to the case where you try to use different hypervisors (e.g., QEMU+KVM and VirtualBox) at the same time - that does not work as you can only run one type of hypervisor at a time (though you may run multiple VMs from each type of hypervisor).



        There are great explanations of the technology details here: https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine






        share|improve this answer























          up vote
          1
          down vote










          up vote
          1
          down vote









          Yes, KVM guests (e.g., Windows or OSX running in QEMU, using KVM) and Docker (e.g., Docker CE running containers) run fine all at the same time on the same Ubuntu instance.



          Your question basically describes my workload. At this moment I'm running two Android emulators (using hardware virtualization acceleration, which is KVM on Linux), a Windows 10 QEMU guest, an OS X High Sierra QEMU guest, and Docker (installed via these instructions https://docs.docker.com/install/linux/docker-ce/ubuntu/) with their hello world example running, all at the same time on an Ubuntu 18.04 host.



          The concise explanation why it works is that virtual machines (QEMU, etc) on Linux use a hypervisor (KVM in the case of QEMU, but Virtualbox and VMWare use different hypervisors) to use your computer's hardware resources, while Docker uses linux namespaces to simply use your currently running kernel's available hardware resources, but segregated from your main operating system.



          In that way, KVM guests and Docker actually run using separate technologies and don't really even inter-relate to each other at the kernel level. This is in contrast to the case where you try to use different hypervisors (e.g., QEMU+KVM and VirtualBox) at the same time - that does not work as you can only run one type of hypervisor at a time (though you may run multiple VMs from each type of hypervisor).



          There are great explanations of the technology details here: https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine






          share|improve this answer













          Yes, KVM guests (e.g., Windows or OSX running in QEMU, using KVM) and Docker (e.g., Docker CE running containers) run fine all at the same time on the same Ubuntu instance.



          Your question basically describes my workload. At this moment I'm running two Android emulators (using hardware virtualization acceleration, which is KVM on Linux), a Windows 10 QEMU guest, an OS X High Sierra QEMU guest, and Docker (installed via these instructions https://docs.docker.com/install/linux/docker-ce/ubuntu/) with their hello world example running, all at the same time on an Ubuntu 18.04 host.



          The concise explanation why it works is that virtual machines (QEMU, etc) on Linux use a hypervisor (KVM in the case of QEMU, but Virtualbox and VMWare use different hypervisors) to use your computer's hardware resources, while Docker uses linux namespaces to simply use your currently running kernel's available hardware resources, but segregated from your main operating system.



          In that way, KVM guests and Docker actually run using separate technologies and don't really even inter-relate to each other at the kernel level. This is in contrast to the case where you try to use different hypervisors (e.g., QEMU+KVM and VirtualBox) at the same time - that does not work as you can only run one type of hypervisor at a time (though you may run multiple VMs from each type of hypervisor).



          There are great explanations of the technology details here: https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Aug 13 at 16:07









          Mike Hardy

          414




          414






















              up vote
              0
              down vote













              I have found no information that suggests any red flags or caution to attaining your goal.



              I researched on this a bit and found that the kernel component of KVM was built into mainline Linux since 2.6.20 kernel, 18.04 LTS ships with 4.15 kernel. KVM is well integrated into Ubuntu 18.04 LTS.



              According to Docker for Ubuntu, Docker is optimized for bare bones servers and VMs.



              You can read more about KVM and Docker respectively.






              share|improve this answer

























                up vote
                0
                down vote













                I have found no information that suggests any red flags or caution to attaining your goal.



                I researched on this a bit and found that the kernel component of KVM was built into mainline Linux since 2.6.20 kernel, 18.04 LTS ships with 4.15 kernel. KVM is well integrated into Ubuntu 18.04 LTS.



                According to Docker for Ubuntu, Docker is optimized for bare bones servers and VMs.



                You can read more about KVM and Docker respectively.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  I have found no information that suggests any red flags or caution to attaining your goal.



                  I researched on this a bit and found that the kernel component of KVM was built into mainline Linux since 2.6.20 kernel, 18.04 LTS ships with 4.15 kernel. KVM is well integrated into Ubuntu 18.04 LTS.



                  According to Docker for Ubuntu, Docker is optimized for bare bones servers and VMs.



                  You can read more about KVM and Docker respectively.






                  share|improve this answer













                  I have found no information that suggests any red flags or caution to attaining your goal.



                  I researched on this a bit and found that the kernel component of KVM was built into mainline Linux since 2.6.20 kernel, 18.04 LTS ships with 4.15 kernel. KVM is well integrated into Ubuntu 18.04 LTS.



                  According to Docker for Ubuntu, Docker is optimized for bare bones servers and VMs.



                  You can read more about KVM and Docker respectively.







                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered Jun 8 at 6:50









                  xtrchessreal

                  5711619




                  5711619






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1044349%2fkvm-and-docker-on-single-ubuntu-host%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      Trouble downloading packages list due to a “Hash sum mismatch” error

                      How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                      Cutting all the characters after the last /