Virtualization: Characteristics, Pros and Cons
Virtualization uses software to create virtual versions of computing resources. For example, one physical server can run several virtual machines (VMs). Each VM can run its own operating system.
A hypervisor creates and runs these VMs. It shares the real computer's CPU (Central Processing Unit), memory, disk and network between them. You will learn how this works and what its limits are.
One big building (the physical server) is divided into many flats (the virtual machines). Each family has its own locked door, kitchen and electricity meter, and does not see the others. The building manager (the hypervisor) decides how much space each flat gets and keeps them separate.
Virtualization creates software-based versions of resources such as computers, storage or networks. For example, one physical server can run several separate virtual machines.
A hypervisor, also called a Virtual Machine Monitor (VMM), creates and runs virtual machines. It gives each VM a share of the host's CPU, memory, storage and network and keeps VMs separate.
The three parts of a virtualized environment
flowchart TB
subgraph G[Guest]
A1[App] --- O1[Guest OS 1]
A2[App] --- O2[Guest OS 2]
A3[App] --- O3[Guest OS 3]
end
O1 & O2 & O3 --> V[Virtualization layer – Hypervisor / VMM]
V --> H[Host – physical hardware<br/>CPU · RAM · disk · NIC]
| Part | Description | Flat example |
|---|---|---|
| Guest | The operating system and apps that run inside a virtual machine. They talk to the virtualization layer instead of the real hardware. | The family living in a flat |
| Host | The real physical machine (hardware, and sometimes a host operating system). | The building itself |
| Virtualization layer | Recreates a "computer" for each guest – this is the hypervisor. | The building manager |
Characteristics of virtualized environments
1. Increased security
The hypervisor controls everything the guest does. Guests are isolated – one VM cannot read another VM's memory. So if one VM is hacked, its neighbours stay safe, and sensitive information can be hidden from guests easily.
2. Managed execution
The hypervisor manages how guests use the real resources. This gives four powerful features:
| Feature | What it means | Everyday example |
|---|---|---|
| Sharing | Many VMs share one physical server, so it is busy 60–80 % of the time instead of only 10–15 %. | Many families sharing one building |
| Aggregation | Several physical servers are joined to look like one big resource (a cluster). | Several small shops joined into one mall |
| Emulation | The guest can be given hardware that does not physically exist – a different type of CPU or an old device. | A game console emulator running old games on a new PC |
| Isolation | Each guest has a completely separate environment; crashes and attacks stay inside one VM. | A fire in one flat is stopped by fire walls |
Managed execution also allows performance tuning: you can reserve or limit CPU and RAM (Random Access Memory) for each VM. This is the basis of guaranteed service quality (QoS) and service agreements (SLAs (Service Level Agreements)).
3. Portability
A VM is just a set of files (a disk image + a settings file). It can be copied, moved to another server, saved at a point in time (snapshot) and restored. In the cloud, a VM image (AMI (Amazon Machine Image) on AWS (Amazon Web Services), qcow2 on KVM (Kernel-based Virtual Machine)/OpenStack, VHD (Virtual Hard Disk) on Hyper-V) can be started anywhere.
A snapshot or checkpoint depends on the VM disks. It is not an independent backup.
Hypervisor types
| Type 1 – bare-metal / native | Type 2 – hosted | |
|---|---|---|
| Runs on | Directly on the hardware | On top of a normal operating system (Windows, macOS, Linux) |
| Performance | High, almost like real hardware | Lower – there is an extra OS layer |
| Used for | Data centres and clouds | Desktops, labs, learning, development |
| Examples | VMware ESXi, Microsoft Hyper-V, Xen, KVM (a Linux kernel module that turns Linux into a type-1 hypervisor) | VMware Workstation, Oracle VirtualBox, Parallels Desktop |
flowchart LR
subgraph T1[Type 1]
direction TB
a1[VM] & a2[VM] --> h1[Hypervisor] --> hw1[Hardware]
end
subgraph T2[Type 2]
direction TB
b1[VM] & b2[VM] --> h2[Hypervisor app] --> os[Host OS] --> hw2[Hardware]
end
Type 1 = the hypervisor is the floor of the building – nothing underneath. Type 2 = the hypervisor is an app you install on your laptop, like VirtualBox.
“Differentiate Type 1 and Type 2 hypervisors with diagrams and examples.” Well-known Type-1 examples are VMware ESXi, Xen, Microsoft Hyper-V and KVM – you work with KVM hands-on in Practical 5 of this course.
Virtualization techniques (CPU virtualization)
Processors have access levels called rings 0–3. The operating-system kernel normally uses the most powerful level. In a VM, the hypervisor must stay in control of sensitive instructions. The table below compares four ways to handle them.
| Technique | How it works | Guest OS changed? | Examples |
|---|---|---|---|
| Full virtualization (binary translation) | The hypervisor catches and translates privileged instructions while the guest runs | No | Early VMware Workstation/ESX |
| Paravirtualization | The guest's kernel is modified to ask the hypervisor directly using hypercalls (like calling the manager instead of breaking the door) | Yes | Xen (PV guests) |
| Hardware-assisted virtualization | The CPU itself helps: Intel VT-x (Virtualization Technology for x86) / AMD-V (AMD Virtualization) add a special mode so normal, unchanged guests run directly | No | KVM, Hyper-V, modern ESXi, Xen HVM (Hardware Virtual Machine) |
| OS-level virtualization (containers) | One kernel, many separate user spaces (using Linux namespaces and cgroups) | Not needed – they share the host kernel | Docker, LXC, Kubernetes pods |
Containers vs virtual machines
| Virtual machines | Containers |
|---|---|
| Virtualize the hardware | Virtualize the operating system |
| Each VM has a full guest OS (GBs in size) | Share the host's kernel (MBs in size) |
| Start in minutes | Start in milliseconds |
| Strong isolation | Weaker isolation (shared kernel) |
| Can run any OS | Same OS family as the host |
Other kinds of virtualization
| Type | What is virtualized | Examples |
|---|---|---|
| Server / hardware | Whole computers | ESXi, KVM, Hyper-V |
| Storage | Many disks pooled into logical volumes | SAN (Storage Area Network), LVM (Logical Volume Manager), Ceph, Amazon EBS (Elastic Block Store) |
| Network | Switches, routers and firewalls made in software | VLAN (Virtual Local Area Network), VXLAN (Virtual Extensible Local Area Network), SDN, Open vSwitch, AWS VPC (Virtual Private Cloud) |
| Desktop (VDI) | Users' desktops run on central servers | Citrix, VMware Horizon, Amazon WorkSpaces |
| Application | Apps run without installing them | App-V, ThinApp, Java JVM (Java Virtual Machine) |
| Memory | Memory is pooled / virtual | Paging, memory ballooning |
Advantages (pros) of virtualization
- Server consolidation – fewer physical servers → lower cost for hardware, electricity, cooling and space.
- Better use of machines – the free capacity of one workload is used by another.
- Isolation and security – crashes and attacks are kept inside one VM.
- Fast setup – a new server in minutes from a ready template, instead of weeks.
- Portability and migration – live migration (vMotion, KVM live migration) moves a running VM to another server with no downtime.
- Snapshots and backup – save the state before a risky change; easy disaster recovery.
- Testing and development – many OS versions on one machine.
- Old software support – run old operating systems on new hardware.
- Foundation for the cloud – makes multi-tenancy, elasticity and self-service possible.
- Green IT (Information Technology) – less electricity used.
Disadvantages (cons) of virtualization
- Performance overhead – the extra layer uses some CPU, memory and especially disk/network (I/O) speed.
- Single point of failure – if one physical server fails, all its VMs stop (reduced with high-availability clusters).
- Resource contention – "noisy neighbours": VMs fight for CPU, disk and network, like neighbours all using water at the same time.
- Licensing cost and complexity – hypervisor licences plus OS licences for each VM.
- Management complexity – VM sprawl: hundreds of forgotten VMs that still use resources.
- Hypervisor security risk – a hole in the hypervisor (VM escape) can expose every guest.
- Hardware requirements – needs VT-x/AMD-V, plenty of RAM and fast storage.
- Skills – administrators need new knowledge.
AWS first used Xen for EC2 (Elastic Compute Cloud) and now uses Nitro, a light KVM-based hypervisor where networking and storage work is moved onto special hardware cards – making the virtualization overhead almost zero. Microsoft Azure runs on a customised Hyper-V; Google Cloud uses KVM.
Summary
- Virtualization creates virtual versions of hardware; the hypervisor (VMM) runs and isolates the VMs.
- Characteristics: increased security, managed execution (sharing, aggregation, emulation, isolation), portability.
- Type-1 hypervisors run directly on hardware (ESXi, Hyper-V, Xen, KVM); type-2 run on a normal OS (VirtualBox, Workstation).
- Techniques: full (binary translation), paravirtualization, hardware-assisted (VT-x/AMD-V), OS-level (containers).
- Pros: consolidation, better use of machines, isolation, speed, migration. Cons: overhead, single point of failure, contention, complexity.
Practice questions
- Define virtualization. Explain the components of a virtualized environment with a diagram.
- Explain the characteristics of virtualized environments.
- What is managed execution? Explain sharing, aggregation, emulation and isolation.
- Differentiate Type-1 and Type-2 hypervisors.
- Compare full virtualization, paravirtualization and hardware-assisted virtualization.
- List the advantages and disadvantages of virtualization.
- Differentiate virtual machines and containers.
Create a free account to track your progress and unlock virtual labs.