Is there any advantage that containerization offers that virtual machines virtualization doesn't?

oslon

Member
Joined
Oct 15, 2023
Messages
50
Reaction score
8
Credits
506
I am preparing for interview questions in devops engineering after working as a IT for 2 years.
In containerization, there are multiple OSes required inside like alpine linux. Same goes for virtual machine virtualization. We can discount the weight of virtual machine VMs. but I think we can always install stuffs on alpine in virtual machine as well.
To create a container and vm both are fast. Just copy and snapshot the vm. We all know what needs to be done for containers.
Honestly I think virtualization is more advantegous than containerization. I've been asked these questions multiple times in various of interviews and training in current company for new role and i have no concrete ideas.
 


@oslon asked:
Is there any advantage that containerization offers that virtual machines virtualization doesn't?
....
i have no concrete ideas

One idea follows, but I can't say whether it's concrete or not.

The differences between containerisation and virtualisation surely have to do with the purpose of the respective installations.

For example, if the user's purpose is to run some specific applications and no more, then a
container that includes the relevant software, including dependencies, in that standalone format, is likely the most resource efficient way to go.

If, on the other hand, the user's purpose is to run a more fully-featured experience with full work loads, then running the whole operating system of a distribution in a virtual machine has advantages. The installation of a distribution in a virtual machine is often going to be a closer representation to the original intents of the distribution than a container could represent because the virtual machine provides a more complete operating system environment that's a bit more isolated.
 
I am preparing for interview questions in devops engineering after working as a IT for 2 years.
In containerization, there are multiple OSes required inside like alpine linux. Same goes for virtual machine virtualization. We can discount the weight of virtual machine VMs. but I think we can always install stuffs on alpine in virtual machine as well.
To create a container and vm both are fast. Just copy and snapshot the vm. We all know what needs to be done for containers.
Honestly I think virtualization is more advantegous than containerization. I've been asked these questions multiple times in various of interviews and training in current company for new role and i have no concrete ideas.
Well,

First of all, they both serve well for their purpose. there is no general answer like "Containers are better", No. You have to decide whether a VM or a container is better for your workflow.
But
Containers are easier to deal with, you don't need a hypervisor, all you need is a CRI that can interact with runc at kernel.
Managing containers is simpler. If you need to update a dependency in production, you just modify the Dockerfile and rebuild the container once. With VMs, you can’t easily recreate the entire image without overhead, so you usually rely on tools like Ansible or other automation to apply updates in place.
 
Containers are MUCH smaller in terms of space on disk and RAM AND CPU usage, hence lighter on resources.
Containers don't need OS files/apps. They don't need to run duplicate processes that your OS already is running.
Due to size, its easier and faster to back them up.
Its easier to re-deploy containers and faster.
 
  • Like
Reactions: BTH


Follow Linux.org

Members online


Top