-7

Docker can creat virtual machines to be used as nodes in swarms.

The machine drivers contains VirualBox but no KVM/QEMU. Does it mean that

  • virtual machines created by KVM/QEMU can't be used as nodes in Docker's swarm?
  • Docker works with VirtualBox but not with KVM/QEMU? (If yes, it is surprising to me, since both Docker and KVM are supported by Linux kernel natively, while VirtualBox seems less so. Is Docker a reason to use VirtualBox instead of KVM/QEMU?)

If Docker can create virtual machines with KVM/QEMU type, then what is to be specified to docker-machine's --driver?

Thanks.

  • 1
    You are confusing the docker engine with docker-machine. Docker doesn't care about the hypervisor, and will run on KVM based VMs with no problem. – Stephen Harris Mar 31 at 2:07
  • 1
    Google says: github.com/dhiltgen/docker-machine-kvm – Michael Hampton Mar 31 at 5:37
  • @MichaelHampton Thanks. Does docker-machine not have a KVM/QEMU argument for --driver option, and not have a KVM driver by default? – Tim Apr 3 at 1:34
  • @StephenHarris I am not. My question again is: does docker-machine not allow KVM/QEMU to be specified after its --driver option, by default? Why? (comparing to that it allows virtualbox to be spciified after its --driver option) – Tim Apr 3 at 2:54
2

Why it is not very useful

As docker runs on the Linux-kernel, there is little need to run it in KVM/QEMU (Why add an extra layer of virtualisation). It is however useful to run in Virtual-box, as this allows docker on Linux, in virtual-box on Microsoft's Windows.

Can it be done

Yes you certainly can do it manually. Just install Linux+Docker into what ever virtual machine that you want.

See also reference in @MichaelHampton's comment — github.com/dhiltgen/docker-machine-kvm

  • (1) "As docker runs on the Linux-kernel, there is little need to run it in KVM/QEMU (Why add an extra layer of virtualisation)." Why is there no such need? Do you not need to have several virtual machines running on a Linux machine, and each virtual machine runs some docker container? In that case, which does Docker work with, KVM/QEMU or VirtualBox? – Tim Apr 3 at 3:11
  • (2) "As docker runs on the Linux-kernel, there is little need to run it in KVM/QEMU (Why add an extra layer of virtualisation)." My question were: docker-machine not allow KVM/QEMU to be specified after its --driver option, by default? Why? (comparing to that it allows virtualbox to be spciified after its --driver option) – Tim Apr 3 at 3:13
  • ①Docker allows you to run many containers, not just one. So you don't need another tool to run many dockers. ② I don't know, how and if. As I don't combine VMs and docker (Unless I use a virtual-machine provided by a cloud provider). – ctrl-alt-delor Apr 3 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.