Docker Ep 3 : Virtual Machines VS Containers
12 August 2024 at 08:40
SNo. | Virtual Machines(VM) | Containers |
---|---|---|
1 | VM is a piece of software that allows you to install other software inside of it so you control it virtually as opposed to installing the software directly on the computer. | While a container is software that allows different functionalities of an application independently. |
2. | Applications running on a VM system, or hypervisor, can run different OS. | While applications running in a container environment share a single OS. |
3. | VM virtualizes the computer system, meaning its hardware. | While containers virtualize the operating system, or the software only. |
4. | VM size is very large, generally in gigabytes. | While the size of the container is very light, generally a few hundred megabytes, though it may vary as per use. |
5. | VM takes longer to run than containers, the exact time depending on the underlying hardware. | While containers take far less time to run. |
6. | VM uses a lot of system memory. | While containers require very less memory. |
7. | VM is more secure, as the underlying hardware isnβt shared between processes. | While containers are less secure, as the virtualization is software-based, and memory is shared. |
8. | VMs are useful when we require all of the OS resources to run various applications. | While containers are useful when we are required to maximize the running applications using minimal servers. |
9. | Examples of Type 1 hypervisors are KVM, Xen, and VMware. Virtualbox is a Type 2 hypervisor | Examples of containers are RancherOS, PhotonOS, and Containers by Docker. |