Member-only story

Virtual Machine (VM) vs. Container

Martin Kaschke
3 min readNov 24, 2020

--

In this article, I would like to compare virtual machines (VMs) with containers and outline the main differences on a high level. Further sources are linked at the end of the article to dig deeper into this topic. Virtual machines (VMs) and containers are two of the main pillars of modern cloud architecture to run services, and both are in the service portfolio of Azure, Google Cloud, and AWS. The following picture describes an overview of the following description.

Virtual Machine (VM) vs. Container

Definitions — VMs and Containers

Virtual machines emulate fully separated computer systems with their own complete operating systems (OS). To manage and provide VM service to the end-users, Hypervisors are needed to run various VMs on a shared infrastructure. As shown in the picture above, there are two types of Hypervisors. The main difference between a Type 1 and a Type 2 Hypervisor is the underlying Host Operating system that is only present on the Type 2 Hypervisor. VMs are a standard offering of Azure, Google Cloud, and AWS.

Containers only require the components of the Operating System that is required to run the application. Typically Linux and Windows are used as Operating Systems that talk directly to the Container Engine. Each container shares the host OS kernel and, usually, the binaries and libraries, too. For the efficient use of resources, shared components are read-only that reduces the container's size and increases the startup time. With the release of Docker in 2013, containers rapidly gain popularity.

Main Differences — VMs and Containers

Virtual Machines (VMs) and Containers are complementary and similar — both improve IT efficiency, application portability, and enhance DevOps. However, understanding the difference between them is a key component of developing an agile, cloud-native, application-driven strategy. (vmware)

Startup time
Since the VM dealing with a full Operating system, the start-up time for a container is much faster than to start VM. As a rule of thumb: VM takes minutes to start up instead of seconds to start a lightweight container.

Disk Space
The Container approach saves a lot of disk space as only the required component will be loaded within…

--

--

Martin Kaschke
Martin Kaschke

No responses yet

Write a response