VIRTUALIZATION STRUCTURE – POINTS
A virtualization architecture is a conceptual model of a virtual
infrastructure, mostly used in cloud computing.
Virtualization is the process of creating and delivering a virtual version
of something instead of a physical one.
This can include:
o Desktop
o Operating system (OS)
o Server
o Storage device
o Network resources
o
The architecture defines the arrangement and interrelationships among
components in the virtual environment.
Before virtualization, the operating system manages hardware
directly.
After virtualization, a virtualization layer is inserted between
hardware and OS.
The virtualization layer:
o Converts real hardware into virtual hardware
o Allows different OSes (e.g., Linux, Windows) to run
simultaneously on the same physical machine
VM Architecture Classes (Based on Layer Position)
Several classes of VM architectures exist depending on the position of
the virtualization layer.
Main types:
1. Hypervisor Architecture
2. Paravirtualization
3. Host-based Virtualization
Hypervisor is also known as Virtual Machine Monitor (VMM).
Hypervisor and VMM perform the same virtualization operations.
Three Basic Virtualization Architectures
1. Hypervisor and Xen Architecture
2. Binary Translation with Full Virtualization
3. Para-Virtualization with Compiler Support
HYPERVISOR AND XEN ARCHITECTURE – POINTS
Hypervisor
Supports hardware-level virtualization on bare metal devices (CPU,
memory, disk, network interfaces).
Sits directly between physical hardware and the operating system
(OS).
Known as the Virtual Machine Monitor (VMM) or hypervisor.
Provides hyper calls for guest OSes and applications.
Based on functionality, hypervisors can be:
o Micro-kernel architecture (e.g., Microsoft Hyper-V)
o Monolithic architecture (e.g., VMware ESX for server
virtualization)
Xen Architecture
Xen is an open-source hypervisor developed by Cambridge
University.
It is a micro-kernel hypervisor that separates policy from mechanism.
The Xen hypervisor implements the mechanism, and Domain 0 handles
the policy.
Xen does not include device drivers natively.
It provides a mechanism allowing a guest OS to access physical devices
directly.
The small size of Xen is due to its minimalist design.
Xen creates a virtual environment between hardware and the OS.
Commercial versions of Xen include:
o Citrix XenServer
o Oracle VM
Core Components of Xen
Three components: Hypervisor, Kernel, Applications
Multiple guest OSes can run on top of the Xen hypervisor.
Among these, one guest OS controls the others — called Domain 0.
Other guest OSes are called Domain U.
Domain 0:
o Is a privileged guest OS
o Loaded first when Xen boots
o Accesses hardware directly
o Manages devices
o Allocates and maps hardware resources for Domain U
BINARY TRANSLATION WITH FULL VIRTUALIZATION – POINTS
Types of Hardware Virtualization
1. Full virtualization
2. Host-based virtualization
Full Virtualization
Does not require modification of the host OS.
Uses binary translation to trap and virtualize sensitive, non-
virtualizable instructions.
Guest OSes and applications include:
o Noncritical instructions
o Critical instructions
Noncritical instructions run directly on hardware.
Critical instructions are:
o Trapped into the VMM
o Emulated by software
Both hypervisor and VMM approaches are considered full
virtualization.
Binary translation causes performance overhead.
Noncritical instructions:
o Do not control hardware
o Do not threaten system security
o Run directly to promote efficiency
Critical instructions:
o Control hardware
o May threaten system security
o Are trapped for safety
Host-Based Virtualization
Virtualization layer is installed on top of host OS.
Host OS manages the hardware.
Guest OSes run on top of the virtualization layer.
Applications can run:
o On the VMs
o Or directly on the host OS
Advantages:
1. Can be installed without modifying the host OS.
2. Virtualization software can use host OS services (e.g., device drivers).
3. Simplifies VM design.
4. Eases deployment.
Disadvantages:
Appeals to various host configurations, but:
o Performance may be low compared to hypervisor/VMM
architecture.
o Hardware access requires four layers of mapping → reduced
performance.
o If ISA (Instruction Set Architecture) of guest OS ≠ ISA of
hardware:
Binary translation is required
Despite flexibility, low performance makes it less useful in practice.
PARA-VIRTUALIZATION WITH COMPILER SUPPORT – POINTS
Basic Concept
Requires modification of the guest OS.
Provides special APIs needing significant OS and user app changes.
Aims to reduce virtualization overhead by modifying only the guest
OS kernel.
Improves performance over traditional full virtualization.
Para-Virtualized VM Architecture
Guest OS is para-virtualized.
Assisted by an intelligent compiler.
Replaces non-virtualizable instructions with hyper calls at compile
time.
Instruction Rings
x86 processors offer 4 rings (0 to 3):
o Ring 0 – highest privilege (OS)
o Ring 3 – lowest privilege (user apps)
Para-virtualized guest OS may run at Ring 1.
Privileged instructions are replaced with hypercalls to the
hypervisor/VMM.
KVM (Kernel-Based Virtual Machine)
Linux para-virtualization system in Linux 2.6.20 kernel.
Linux kernel handles memory and scheduling.
KVM handles the rest → simpler than full hypervisors.
Hardware-assisted para-virtualization.
Supports unmodified guest OSes like Windows, Linux, Solaris, UNIX
variants.
Hypercalls vs System Calls
Traditional UNIX system calls use interrupt/service routine.
Hypercalls use dedicated service routines (e.g., in Xen).
VMware ESX Server (Para-Virtualization)
VMware pioneered virtualization tools.
ESX is a hypervisor (VMM) for bare-metal x86 SMP servers.
Accesses hardware directly, full resource management.
ESX Server components:
1. Virtualization Layer
2. Resource Manager
3. Hardware Interface Components
4. Service Console
ESX Server Functionality
VMM layer virtualizes CPU, memory, disk, network, and human
interface devices.
Each VM gets its own virtual hardware resources.
Resource manager maps resources to each VM.
Hardware interface: device drivers + VMware File System.
Service console:
o Boots system
o Starts VMM and resource manager
o Then hands over control
o Supports admin processes