Implementation Levels of Virtualization
Introduction to Virtualization
Benefits of Virtualization
Virtualization Architecture
Levels of Virtualization Implementation
ISA Level Virtualization
Hardware Level Virtualization
Operating System Level Virtualization
Library Support Level Virtualization
Application Level Virtualization
Introduction to Virtualization
• Definition: Virtualization is a technology that
enables multiple virtual machines (VMs) to
share the same physical hardware by creating
a virtualized environment.
• Purpose: Enhances resource sharing,
optimizes performance, and provides
flexibility in deploying applications.
Benefits of Virtualization
• Resource Optimization: Maximizes the use of CPU, memory,
and storage resources by running multiple workloads on a
single machine.
• Application Flexibility: Allows different operating systems and
applications to run on the same hardware simultaneously.
• Isolation & Security: Each VM runs independently, minimizing
the impact of software failures or security breaches.
• Portability: Virtual machines can be easily migrated across
different physical servers without modification.
• Cost Efficiency: Reduces hardware costs and improves energy
efficiency by consolidating workloads.
Levels of Virtualization Implementation
• Virtualization can be implemented at different layers
within a computing system:
• ISA Level: Changes instructions so software works on
different hardware.
• Hardware Level: Uses a hypervisor to share physical
resources.
• OS Level: Uses containers to run multiple apps on the same
OS.
• Library Level: Uses special libraries to run apps on different
OSs.
• Application Level: Runs apps in a virtual environment.
ISA Level Virtualization
• What is ISA Virtualization?
– Involves translating machine instructions so software designed for one CPU architecture can
run on another.
• How It Works:
• Makes one type of processor act like another.
• Lets software run on hardware it wasn’t designed for.
• A virtual machine translates instructions from one architecture to another in real-time.
• Enables cross-platform software execution.
• Use Case:
• Useful for running legacy software on modern architectures.
• Allows software compatibility across different hardware platforms.
• Real Example:
• Running Windows on Apple M1/M2 Macs using QEMU or Rosetta 2.
• This lets Windows apps work on Apple's ARM-based processors.
• Tools: QEMU, Bochs, Rosetta 2
Hardware Level Virtualization
• Purpose: Creates virtual machines by abstracting hardware resources.
• Splits a physical server into multiple virtual machines (VMs).
• Each VM acts like a separate computer.
• How It Works:
– A hypervisor manages multiple operating systems on a single physical machine.
– Provides virtualized CPU, memory, storage, and network access.
• Use Case:
• Used in cloud computing, enterprise IT, and data centers.
• Allows efficient resource sharing and workload distribution.
• Real Example:
• Cloud Computing (AWS, Azure, Google Cloud):
– Netflix runs its services on AWS cloud VMs instead of physical servers.
• Tools: VMware, Hyper-V, Xen
• Operating System Level Virtualization
• Purpose: Runs multiple isolated applications on the same OS kernel.
• Instead of creating full virtual machines (VMs), OS-level virtualization
creates lightweight containers that run applications separately but use
the same OS.
• Creates containers to run multiple apps separately on the same OS.
• How It Works:
– Instead of virtualizing hardware, OS-level virtualization isolates applications in
separate containers.
– Each container shares the same OS kernel but operates independently.
• Docker Containers → Used by Google, Facebook, and Twitter.
– Developers use Docker to package apps, so they work the same on any
computer.
• 🛠 Tools: Docker, Kubernetes, LXC
Library Support Level Virtualization
• Library Support Level Virtualization
• Purpose: Allows applications to run on different operating systems without
modification.
• apps run on an OS they weren’t made for
• How It Works:
– Instead of virtualizing an entire OS, specific libraries create an abstraction layer for
applications.
– Enables software to execute regardless of OS differences.
• Use Case:
• Helps applications work across different platforms.
• Reduces software dependency on OS-specific features.
• Real Example:
• Running Windows apps on Linux using Wine
– Lets you run MS Office or Photoshop on Linux without installing Windows.
• 🛠 Tools: Wine, vCUDA, Proton
Application Level Virtualization
• Purpose: Enables software to run in a virtualized environment,
independent of the host OS.
• How It Works:
– Applications are executed in a sandboxed or emulated environment.
– Provides portability and security by isolating applications.
• Use Case:
• Allows platform-independent software execution.
• Supports cloud applications, web-based services
• Real Example:
• Java apps running on any OS
– A Java program runs on Windows, macOS, or Linux without changes
because of the Java Virtual Machine (JVM).
• 🛠 Tools: JVM, .NET CLR, ThinApp
Implementation level of virtualization
Implementation level of virtualization
• Traditional Computer (Left Side)
– Applications run directly on the host operating system.
– The host OS interacts directly with hardware (CPU, memory, storage, etc.).
– There is no virtualization, meaning software is tightly coupled with the hardware.
• After Virtualization (Right Side)
– A virtualization layer (Hypervisor/VMM) is introduced between the hardware and the
operating systems.
– Multiple Guest OS instances can run independently on the same physical hardware.
– Each Guest OS has its own applications, creating isolated Virtual Machines (VMs).
– The hypervisor manages resources, ensuring efficient use of hardware.
• Key Takeaways:
• Virtualization enables multiple operating systems to run on the same hardware.
• It improves resource utilization and flexibility.
• Hypervisors create isolated environments, making computing more secure and
scalable.
Virtualization Support at the OS Level
• With the help of VM (Virtual Machine)
technology, a new computing mode known as
cloud computing is emerging. Cloud
computing is transforming the computing
landscape by shifting the hardware and
staffing costs of managing a computational
center to third parties, much like banks handle
financial transactions.
Why OS-Level Virtualization?
Full virtualization at the hardware level
suffers from:
1 Slow performance: In full virtualization, each VM emulates its own
hardware and runs a full OS. This means:
• Every request (e.g., reading a file or processing data) goes through an
extra virtualization layer, slowing things down.
• This is especially problematic for applications that require high
performance, like gaming servers or real-time analytics.
• 🔹 Example:
Imagine playing a video game on a fully virtualized cloud server.
• Every time you press a key, the input must go through multiple layers
(VM → Virtualization Layer → Physical Hardware).
Why OS-Level Virtualization?
2.Low density:Since each VM runs a separate
OS, it consumes extra memory, CPU, and
storage, reducing the number of VMs that can
fit on a single server.
Why OS-Level Virtualization?
OS-Level Virtualization
• Operating system virtualization inserts a
virtualization layer inside an operating system (OS)
to partition a machine’s physical resources. This
enables multiple isolated VMs within a single OS
kernel.
These VMs are often referred to as:
• Virtual Execution Environments (VE),
• Virtual Private Systems (VPS), or
• Simply containers.
Virtual Execution Environments (VEs), Virtual
Private Systems (VPS), and Containers?
OS-level virtualization, where multiple isolated environments run
on a single OS kernel instead of using full Virtual Machines (VMs).
Virtual Execution Environment (VE)
• A VE is a lightweight, isolated environment created on a shared
OS. It provides users with their own processes, file system,
network settings, and users, but all VEs share the same OS kernel.
• 🔹 Example:
Imagine a university computer lab where every student logs into a
personal workspace (VE). Each student feels like they are using
their own system, but in reality, they are sharing the same OS and
hardware with others.
Virtual Execution Environments (VEs), Virtual Private
Systems (VPS), and Containers?
Virtual Private System (VPS)
• A VPS is a type of VE that is used for hosting websites or
applications. It is commonly used by cloud service
providers to give customers their own private server
space without requiring a separate physical machine.
• 🔹 Example:
A small business wants to host a website. Instead of
renting a full dedicated server, they rent a VPS from a
cloud provider. They get full control over their
environment (installing software, setting up security) but
still share the same physical hardware with other users.
Virtual Execution Environments (VEs), Virtual Private
Systems (VPS), and Containers?
Containers
• Containers (like Docker, Kubernetes) are the most modern
form of OS-level virtualization. Unlike traditional VMs,
containers do not include a full OS; instead, they share the
host OS kernel but keep applications and dependencies
separate. This makes them faster, lightweight, and portable.
• 🔹 Example:
A software company develops a web app that must run on
Linux, Windows, and macOS. Instead of creating separate
VMs for each OS, they use Docker containers, allowing the
app to run anywhere without compatibility issues.
Container-based virtualization approach
for Linux.
• This diagram illustrates the OpenVZ virtualization
architecture, which enables multiple Virtual Private Servers
(VPS) to run on a single physical server while sharing the
same host operating system (OS).
OpenVZ virtualization architecture,
• Network & Hardware Layer
– Represents the physical infrastructure, including CPU, RAM, storage, and network interfaces.
• Host Operating System
– The primary OS installed on the physical machine (e.g., Linux).
– Unlike full hypervisor-based virtualization (like VMware or KVM), OpenVZ does not emulate hardware
but shares the OS kernel.
• OpenVZ Layer
– A container-based virtualization layer that allows multiple isolated Virtual Private Servers (VPS) to run
on the same OS.
– Ensures resource allocation and isolation (CPU, memory, disk).
• OpenVZ Templates
– These are pre-configured OS images used to create VPS instances quickly.
– Each VPS uses a template to install an OS, but all share the same host kernel.
• Virtual Private Servers (VPS) / Containers
– Each VPS is an independent virtual environment with its own root access, users, applications, and file
system.
– Multiple VPS instances can run on the same host without affecting each other.
– Since they share the same OS kernel, they cannot run different operating systems (e.g., you cannot run
Windows VPS on a Linux host).
Disadvantages of OS Extensions
1 Same OS Kernel Limitation:
if you have a Linux-based OpenVZ host, you cannot run
Windows-based virtual machines inside it.
2. Limited Kernel Customization:If a container needs a
specific Linux kernel version to run a legacy application,
but the host OS uses a newer kernel, the application may
not function properly.
3.Security Risks (Shared Kernel Vulnerabilities):If a hacker
exploits a Linux kernel vulnerability on an OpenVZ server,
they can gain access to all containers running on the same
host.
Disadvantages of OS Extensions
• Resource Management Challenges:A single
high-traffic web server container consuming too
much CPU/memory can affect other containers,
leading to performance degradation.
• File System Sharing Issues :If a system admin
accidentally misconfigures OpenVZ file system
permissions, an attacker inside a container
might access sensitive host system files, leading
to data breaches.
Middleware Support for Virtualization
• Middleware plays a crucial role in
virtualization by enabling communication
between different software and hardware
layers
Middleware solutions
• middleware solutions that help run applications
designed for one operating system on a different one.
They work as system call translators, allowing cross-
platform compatibility.
1 .WABI (Windows Application Binary Interface)
• Purpose: Allows Windows applications to run on
Solaris (a UNIX-based OS).
2. Lxrun (Linux Run)
• Purpose: Allows Linux applications designed for x86
systems to run on UNIX (like SCO OpenServer).
Gpu virtualization
• The Problem:Normally, when using
virtualization (like VirtualBox or VMware),
virtual machines (VMs) do not have direct
access to the physical GPU of the host system.
• GPU-intensive applications, like machine
learning, gaming, or graphics rendering,
require access to a GPU to work efficiently.
• vCUDA solves this problem by allowing VMs to
share the host GPU.
How vCUDA Works:
On the Guest OS (Virtual Machine)
• A CUDA application (e.g., a deep learning model) tries to use the GPU.
• The application sends requests to the vCUDA library, which acts like a
translator.
• The vCUDA library passes the request to a virtual GPU (vGPU), which is
a software-based representation of a real GPU.
On the Host OS (Physical Machine)
• The request is received by the vCUDA stub, which forwards it to the
CUDA library on the host.
• The CUDA library sends the request to the device driver, which directly
interacts with the physical GPU.
• The physical GPU performs the requested computation (e.g., training a
neural network).
How vCUDA Works:
• Returning the Results
• The GPU processes the task and sends the result back
through the same chain, from the device driver → CUDA
library → vCUDA stub → vCUDA library on the guest OS.
• The application running inside the VM gets the output as
if it had direct GPU access.
• Why vCUDA is Useful
• ✅ GPU Sharing: Multiple virtual machines can use one
GPU, making cloud computing more efficient.
• Allows virtual machines to share a single physical GPU.
VIRTUALIZATION STRUCTURES/TOOLS AND
MECHANISMS
• Virtualization helps run multiple OSes on the
same hardware.
• Hypervisors create and manage virtual
machines.
• Xen is a lightweight, open-source hypervisor
that follows a micro-kernel approach.
VIRTUALIZATION STRUCTURES/TOOLS AND
MECHANISMS
• Introduction:Virtualization allows multiple
operating systems (OS) to run on the same
physical computer at the same time by
creating Virtual Machines (VMs). This is done
by adding a virtualization layer between the
hardware and the OS.
VIRTUALIZATION STRUCTURES/TOOLS AND
MECHANISMS
On the position of the virtualiza-tion layer, there are
several classes of VM architectures:
1.Hypervisor Architecture: A software layer (called a
hypervisor) sits directly on the hardware, controlling
access to resources like CPU and memory.
2.Paravirtualization:The guest OS is modified to work with
the hypervisor, reducing overhead and improving
performance.
3.Host-Based Virtualization:The virtualization layer runs on
top of an existing OS, allowing VMs to run as
applications.
VIRTUALIZATION STRUCTURES/TOOLS AND
MECHANISMS
• Key Hypervisor Architectures
• Micro-Kernel Hypervisor (Example: Microsoft Hyper-V)
– Contains only essential functions like CPU scheduling and
memory management.
– Device drivers and additional features are outside the
hypervisor, making it smaller and more secure.
• Monolithic Hypervisor (Example: VMware ESXi)
– Includes everything (device drivers, memory management,
networking) inside the hypervisor.
– Larger size but better performance because everything is
tightly integrated.
VIRTUALIZATION STRUCTURES/TOOLS AND
MECHANISMS
• Xen Hypervisor Architecture
• The Xen Hypervisor is a virtualization layer that allows multiple operating systems
to run on the same physical machine. Your notes describe the architecture as
follows:
• Xen is a popular open-source Type 1 hypervisor developed by Cambridge
University. It follows the micro-kernel architecture, keeping the hypervisor small
and secure.
• Key Components of Xen
• ComponentFunctionHypervisorThe core software that manages hardware and
VMs.Domain 0 (Dom0)A special VM with privileged access that controls other
VMs.Domain U (DomU)Normal guest VMs that run different OSes. Why is Xen
Special?
• No built-in device drivers → Keeps the hypervisor small and fast.
• Uses Dom0 to control resources and handle hardware access.
• Supported by major companies like Citrix (XenServer) and Oracle (Oracle VM).
Xen Hypervisor Architecture
• Domain 0 (Dom0) – The Control & I/O Domain
• What is it? → Dom0 is a privileged guest OS that
has direct access to hardware and manages other
VMs (DomU).
• Role:
✅ Starts first when Xen boots.
✅ Handles hardware drivers (since Xen does not
have built-in drivers).
✅ Controls the creation, scheduling, and termination
of guest VMs.
Xen Hypervisor Architecture
• Domain U (DomU) – Guest Virtual Machines
• What is it? → These are unprivileged guest VMs that
run user applications.
• Role:
✅ Runs on top of Xen Hypervisor.
✅ Can be Linux (XenoLinux) or Windows
(XenoWindows).
✅ Uses virtualized hardware managed by Dom0.
• 💡 Example: A cloud provider like AWS can run multiple
Linux & Windows VMs (DomU) on the same Xen-based
server.
Xen Hypervisor Architecture
• Xen Hypervisor – The Virtualization Layer
• What is it? → The Xen Virtual Machine Monitor (VMM)
that manages CPU, memory, and virtualization.
• Role:
✅ Sits between hardware and guest OSes.
✅ Ensures resource allocation and isolation of VMs.
✅ Supports both Full Virtualization (HVM) and
Paravirtualization (PV).
• 💡 Example: When AWS runs a virtual machine, Xen
assigns CPU & memory to it while keeping it isolated
from other VMs.
Xen Hypervisor Architecture
• Hardware Devices – Physical Machine
Components
• Includes: CPU, RAM, storage, and network
interfaces.
• Managed by: Dom0 (since Xen does not have
native drivers).
• 💡 Example: If a guest VM (DomU) needs disk
access, Dom0 will handle the request.