How do Docker and other container services differ from KVMs?

Looking at this question and its answers, it’s clear that a few points make container services fairly different from traditional VMs:

All of this allows them to boot in a fraction of the time it takes for a full VM.

I may have some misconceptions about how KVMs work and about the hypervisor model, but aren’t containers much like KVMs? In what do they differ, and what are the performance gains/losses for either of them?

  • Host verification failed error when running git clone inside dockerfile on AWS EC2 instance as host and a private git repository
  • DOCKER_OPTS in Docker container 1.9.1-dind
  • What to do with pid files in a docker container
  • Forbid docker to use specific network
  • invalid header field value "oci runtime error while running docker image
  • Docker-compose.yml Is not working for elasticserch
  • One Solution collect form web for “How do Docker and other container services differ from KVMs?”

    I may have some misconceptions about how KVMs work and about the
    hypervisor model, but aren’t containers much like KVMs? In what do
    they differ, and what are the performance gains/losses for either of
    them?

    A virtual machine is just that — “virtual” hardware that can boot pretty much any compatible operating system. For example, you can run Windows in a VM on your Linux host. A VM provides a variety of emulated hardware, including the CPU, network cards, storage interfaces, and so forth.

    In contrast, a container is nothing more than a collection of processes on your host. Processes running inside the container are no different from processes running outside the container — from the host you can see them with ps, manage them using tools like kill, etc. Because of this, processes running in containers are using your host kernel — you can’t, say, run a Windows binary inside a container on your Linux host.

    Because they’re not performing any sort of hardware virtualization, containers are substantially lighter weight than virtual machines. As long as you are able to work with their limitations (ie., the fact that they are limited to the host operating system kernel), they will yield better utilization of hardware than running the same services inside a virtual machine.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.