Sahab Imdad 04 Virtual Systems and Services
Virtualization Structures
Virtualization structures define how the virtual environment is organized and how virtual
machines interact with the physical hardware. There are two primary virtualization approaches:
1. Full Virtualization
The hypervisor completely emulates the underlying hardware.
Guest OS does not need modification.
Pros: Runs unmodified operating systems.
Cons: Slight performance overhead due to hardware emulation.
Example: VMware ESXi, VirtualBox
2. Para-Virtualization
Guest OS is aware of the hypervisor and makes direct calls (hypercalls) to it.
Pros: Better performance and reduced overhead.
Cons: Requires modification of guest OS.
Example: Xen Hypervisor
3. OS-Level Virtualization (Containers)
Virtualizes the OS kernel instead of hardware.
Multiple isolated containers share the same host OS kernel.
Pros: Lightweight, fast, portable.
Cons: All containers must use the same OS type.
Example: Docker, LXC
Virtualization of CPU
CPU virtualization allows multiple VMs to share the physical processor while appearing to
have dedicated CPUs.
Mechanisms:
1. Time-sharing: Hypervisor schedules CPU time for each VM.
2. Virtual CPU (vCPU): Each VM sees one or more vCPUs, which map to physical CPU
cores.
3. Hardware-assisted Virtualization: Modern CPUs provide virtualization extensions
(Intel VT-x, AMD-V) for faster and safer VM execution.
Benefits:
Sahab Imdad 04 Virtual Systems and Services
Efficient CPU utilization
Ability to run multiple OS concurrently
Isolation between VMs
Virtualization of Memory
Memory virtualization abstracts physical RAM for each VM. Each VM sees its own continuous
memory space.
Mechanisms:
1. Virtual Memory Mapping: Hypervisor maps guest physical addresses to host physical
addresses.
2. Memory Overcommitment: Allocate more memory to VMs than physically available,
relying on swap or ballooning.
3. Balloon Driver: Dynamically adjusts VM memory allocation based on usage.
Benefits:
Isolation and security
Efficient memory utilization
Flexibility for dynamic workloads
Virtualization of I/O Devices
I/O virtualization allows multiple VMs to share physical devices (disk, network, USB) safely.
Mechanisms:
1. Full Emulation: Hypervisor emulates hardware devices for the VM.
2. Para-Virtualized Drivers: Guest OS uses optimized drivers to communicate efficiently
with devices.
o Examples: virtio network and disk devices in KVM/Xen
3. Direct I/O (Pass-through): Physical device is directly assigned to a VM, bypassing
hypervisor for maximum performance.
Benefits:
Improved I/O performance with para-virtualized drivers
Safe sharing of hardware among VMs
Supports high-performance applications
Sahab Imdad 04 Virtual Systems and Services
Summary Table
Resource Virtualization Approach Key Mechanism Benefits
Full / Para / Hardware- vCPU, scheduling, Isolation, efficiency, multiple
CPU
assisted hypercalls OS
Virtual / Overcommit / Security, dynamic allocation,
Memory Guest-to-host mapping
Ballooning scalability
Full emulation / Para / Device emulation, virtio, High performance, safe
I/O
Direct pass-through sharing, portability