3 ms·
VMs share resources from the host: disk, network, memory. Just like a container shares resources from the host. Containers re-use the running Operating System
by user5994461 10y ago
VMs share resources from the host: disk, network, memory. Just like a container shares resources from the host.
Containers re-use the running Operating System from the host, it saves memory but it can only run a single OS.
A VM can run any operating system, and each VM runs its OS independently. VMs are memory intensive, there is a base 100-500MB to pay to run any VM because of the independent OS. (Note that the advanced VM managers have evolved to have memory deduplication and COW across VMs.)
Containers exist to save memory. That was the critical pain at the time they came to existence. Memory was expensive, it was a major problem when you wanted to run 10 hello world applications as 10 separate VMs.
- ec109685 10y agoContainers give the OS the ability to optimally schedule processes among them. VMs are black boxes to the hypervisor, limiting its ability to optimize.
- user5994461 10y agoThe hypervisor has processes inside the VMs. It has limited control but it is far from blind.