Containers vs VMs

Lot of time this discussion come up difference between containers and virtual machine. In this blog we will be discussing following:

  • What is VMs?
  • What is container?
  • Important Difference

What is VMs??

A Virutal Machine is complete emulation of compute system. This has complete capablility of real Operating system. This implementation require specific hardware and software combination to run it.Virutalization software allows you to mulitple Operating system on same physical hardware. They are completely isolated from physical hardware, need to communicate to hardware from hypervisor (virtualize software)

For example : x86 supported hardware + VMware esx hyvervisor or virtualbox or hyper-V.

What is Container?

Containers are entirely isolated set of packages ,libraries and applications that are completely independent from each other. In real life example, plastic containers are on a table. In a way table is a platform to hold, plastic containers which are kept on table are completely isolated and independent.

Same way Operating system is our table aka platform to keep containers. Containers all together are independent as well.

Important Difference between Container and VMs:

Now we know, what is VMs and Containers. VMs are complete OS image, which run independently on a hypervisor. In VMs are sharing physical hardware using hypervisor.

In case of containers we are sharing Operating system. There would be host Operating system, which will provide the platfrom to containers. Containers are not independent OS, they are more like packages, which are isolated with each other.