Virtual Machines vs Containers
| Virtual Machine | Container |
|---|---|
| Heavyweight | Lightweight |
| Limited performance | Near-native performance |
| Each VM runs its own full OS | All containers share the host OS kernel |
| Hardware-level virtualization | OS-level virtualization |
| Startup measured in minutes | Startup measured in milliseconds |
| Pre-allocates its memory allowance | Requires far less memory |
| Fully isolated, therefore more secure | Process-level isolation, potentially less secure |
The security row deserves emphasis. Containers isolate processes, not hardware. Because every container on a host shares that host's kernel, a kernel-level vulnerability has a wider blast radius than it would across virtual machines. This is a trade-off accepted in exchange for density and speed, not a problem that has been solved.