How is container different from a virtual machine?

Technology CommunityCategory: DevOpsHow is container different from a virtual machine?
VietMX Staff asked 3 years ago
  • Unlike a virtual machine, a container does not need to boot the operating system kernel, so containers can be created in less than a second. This feature makes container-based virtualization unique and desirable than other virtualization approaches.
  • Since container-based virtualization adds little or no overhead to the host machine, container-based virtualization has near-native performance
  • For container-based virtualization, no additional software is required, unlike other virtualizations.
  • All containers on a host machine share the scheduler of the host machine saving need of extra resources.
  • Container states (Docker or LXC images) are small in size compared to virtual machine images, so container images are easy to distribute.
  • Resource management in containers is achieved through cgroups. Cgroups does not allow containers to consume more resources than allocated to them.