A virtual machine (VM) is a software-defined computer running on a physical computer. It has its own operating system, applications, and allocated CPU, memory, and storage. Several VMs can share one physical server while operating as separate systems. section 13.4.2
This arrangement is called virtualization. Think of a large hotel suite divided into private rooms: the guests share a building, but each has a space of their own. For an organization, sharing a server that would otherwise run below capacity can reduce the need for equipment, space, electricity, and cooling. section 13.4.2
One server, several jobs
A university divides a server with 16 CPU cores and 64 GB of RAM into four VMs. Separate systems run an exam platform, a research notebook hub, legacy administrative applications, and a web-facing service. Each job gets an independent virtual computer instead of requiring its own physical server. section 13.4.2
|
|
Virtual
Machines (VMs)
|
Containers
|
|
Virtualization
|
Full
(Hypervisor emulates entire hardware stack)
|
Lightweight
(Container engine shares the host OS)
|
|
Isolation
|
Strong
(each VM instance has its own OS)
|
Moderate
(each container is a runtime environment on the same shared OS)
|
|
Startup Time
|
Slow
(minutes)
|
Fast
(seconds)
|
|
Performance
|
~15% loss
|
<2% loss
|
|
Density
|
10–100
instances per host
|
100–1000
instance per host
|
|
Security Risks
|
Compromise
of OS is typically contained to that VM
|
Shared OS
increases potential blast radius on OS security attacks
|
|
Ideal Use Case
|
Running
multiple fully independent OS environments
|
Rapid
deployment of microservices and applications
|
|
Virtualization
|
Full
(Hypervisor emulates entire hardware stack)
|
Lightweight
(Container engine shares the host OS)
|
|
Isolation
|
Strong
(each VM instance has its own OS)
|
Moderate
(each container is a runtime environment on the same shared OS)
|
Compare VMs with containers when choosing how to run workloads: VMs provide separate operating systems and stronger isolation, while containers share the host operating system and start faster. section 13.4.2


















