Source
Virtualization
Definition of virtualization, types and key approaches.
Virtualization allows you to run multiple isolated environments on a single physical server. For a VM, this means multiple guest OSes on top of shared hardware and a hypervisor.
What types of virtualizations are there?
Hardware virtualization
Creating virtual machines with separate guest operating systems.
Virtualization at the OS level
Containers share the kernel but isolate processes and the file system.
Network virtualization
Virtual networks, switches and balancers on top of the physical network.
Storage virtualization
Logical volumes and disk distribution between VMs.
Virtualization for VM
Full virtualization
The guest OS runs without modifications, the hypervisor emulates the hardware.
Paravirtualization
The guest OS knows about the hypervisor and optimizes calls.
Hardware-accelerated
Uses CPU support (eg VT-x/AMD-V) to improve performance.
Type 1 (bare-metal)
The hypervisor runs directly on the hardware and manages the VM.
Type 2 (hosted)
The hypervisor runs on top of the host OS and uses its drivers.
In practice, Type 1 hypervisors are more often used in clouds, and Type 2 on workstations.
Multiple VMs on one host
The hypervisor distributes CPU, memory, network and disk between virtual machines, providing isolation.
The hypervisor virtualizes CPU, memory, network, and disk, creating isolated VMs.
Virtual machines inside host
VM 1
- Guest OS
- Nginx
- App A
VM 2
- Guest OS
- API
- Worker
VM 3
- Guest OS
- DB
- Cache
All VMs share one host's resources but stay isolated at guest OS and hypervisor levels.
How the request reaches nginx inside the VM
The request path passes through the host network interface, the hypervisor virtual switch, the guest OS and the service inside the VM.
Request path to nginx inside the VM
Request path: internet → host → hypervisor → VM → service
External
Layer 1Host
Layer 2Hypervisor
Layer 3VM
Layer 4Service
Layer 5Active step
Click "Start" to walk through the request path.
Why is it important to know virtualization
- VMs provide isolation and ease of migration of services between hosts.
- Performance depends on hypervisor, I/O and allocated resources.
- Network paths within a VM add latency, which is important to consider in SLAs.
- Scaling is often built around the VM as the unit of deployment.
- Understanding VM helps you estimate the cost and density of services.
