Day 15 : Docker vs Virtual Machine

#90daysofdevops #devops

·

2 min read

1.What is a Virtual Machine?

A Virtual Machine (VM) is a virtual environment that functions as a virtual computer system with its CPU, memory, network interface and storage, created on a physical hardware system.

Like a container, a VM is a piece of software used for virtualization.

But unlike containers, you must build VMs on top of a software layer called a hypervisor.

While a container is an isolated process made for a single service, VMs run a whole and separate OS. That means a single VM can handle a wide range of tasks and execute them all simultaneously, and can be used for a broader set of use cases.

Because VMs create a complete computing environment, it is heavy in nature. Comparatively, containers are lightweight.

2.Containers(Docker) vs Virtual Machine

  1. Resource Utilization: Containers share the host operating system kernel, making them lighter and faster than VMs. VMs have a full-fledged OS and hypervisor, making them more resource-intensive.

  2. Portability: Containers are designed to be portable and can run on any system with a compatible host operating system. VMs are less portable as they need a compatible hypervisor to run.

  3. Security: VMs provide a higher level of security as each VM has its own operating system and can be isolated from the host and other VMs. Containers provide less isolation, as they share the host operating system.

  4. Management: Managing containers is typically easier than managing VMs, as containers are designed to be lightweight and fast-moving.

If this post was helpful, please follow and click the 💚 button below to show your support.

_ Thank you for reading!

_Sudipa