Chapter No.
2
Virtualization
Prof. Vilas C. Rathod
Department of Computer Engineering
Dept. of Polytechnic & Skill Development
Course Outcome
❖ Classify various cloud service models.
Content:
Unit - I Virtualization
Introduction, Virtualization reference model, characteristics of virtualized
environment, virtualization types,
Technology Example: VMWare, Microsoft Hyper-V, KVM, Xen.
Advantages: Virtual Machine (VM), VM migration, VM Consolidation, VM
management, Disadvantages of Virtualization.
Before Virtualization: Introduction
Before Virtualization (Traditional Computing
Environment)
1. One Server = One Application
• Earlier, each physical server (computer) ran only one
operating system and one application.
• Example: 2. Underutilization of Resources
• One server for email • Most servers used only 10–20% of CPU and
• Another server for database
• Another for web hosting
memory capacity, while the rest of the
Dedicated Hardware for every single task. resources remained idle.
• Hardware was expensive but not efficiently
used.
• Example: A server with 16 GB RAM might
use only 3 GB for its single application —
the rest stayed unused.
Before Virtualization: Introduction
Problems Before Virtualization
Issue Description
Hardware used inefficiently; most resources
Underutilization
idle
High Cost Many physical servers needed
Maintenance Overload Each system required separate management
Limited Flexibility Hard to deploy or migrate applications
Poor Disaster Recovery Physical system failure led to downtime
Transition to Virtualization
• To overcome these problems, virtualization was introduced.
• It allows multiple virtual machines (VMs) to run on a single physical machine, each
with its own OS and application — making better use of resources, reducing costs, and
simplifying management.
Before Virtualization: Introduction
Virtualization: Introduction
1. Introduction to Virtualization
• Virtualization is a technology that
allows multiple operating systems and
applications to run on a single physical
machine by dividing its hardware
resources logically.
• It enables the creation of Virtual
Machines (VMs) — software-based
representations of physical computers.
Example:
• A single computer can run Windows, Linux, and Ubuntu simultaneously using virtualization software like
VMware or VirtualBox.
The Core Architecture
• At the heart of virtualization is a piece of software called the Hypervisor.
[Link] Hardware (Host): The actual server
(CPU, RAM, Disk).
Working of Virtualization
[Link]: A lightweight software layer that
• Virtualizations uses special software known
sits between the hardware and the virtual
as hypervisor, to create many virtual
machines. It allocates resources (e.g., "Give VM1
computers (cloud instances) on one physical
2GB of RAM") and manages the VMs.
computer.
• The Virtual Machines behave like actual
[Link] Machine (Guest): A software-based
computers but use the same physical machine.
computer that runs like a physical one. It has its
own OS, libraries, and applications.
Two Types of Hypervisors
Type 1: Bare-Metal Hypervisor
• How it works: Installed directly on
the physical hardware. There is no
host Operating System.
• Performance: High. Direct access to
hardware resources.
• Use Case: Enterprise Data Centers,
Cloud Providers (AWS EC2, VMWare
ESXi, Microsoft Hyper-V).
Note: Bare metal” means directly on the physical hardware, without any layer in between.
Bare metal = the actual computer machine (CPU, RAM, storage)
No operating system, no virtual machine, no emulator on top
The Two Types of Hypervisors
Continue..
Type 2: Hosted Hypervisor
• How it works: Installed as an
application on top of an existing
OS (like Windows or macOS).
• Performance: Lower. Requests
must pass through the Host OS
first.
• Use Case: Personal use, testing
labs (Oracle VirtualBox, VMWare
Workstation).
Difference Between Type 1 and Type 2 Hypervisor
Basis Type 1 Hypervisor (Bare-Metal) Type 2 Hypervisor (Hosted)
Runs on Directly on physical hardware On top of a host OS
Hardware access Direct access to CPU, memory, I/O Indirect access (via host OS)
Performance High performance, low latency Lower performance
Security More secure Less secure
Stability Very stable Depends on host OS
Boot process Hypervisor boots first Host OS boots first
Overhead Minimal Higher
Used in Cloud data centers Desktop / personal systems
Best for Production, enterprise cloud Testing, learning, development
Cost Usually expensive Often free or low cost
The Two Types of Hypervisors
Continue..
Examples:- Type 1 Hypervisors
• VMware ESXi
• Xen
• Microsoft Hyper-V (bare-metal)
• KVM (Linux-based)
Type 2 Hypervisors
• VirtualBox
• VMware Workstation
• VMware Player
• Parallels Desktop
Virtualization Reference Model
Virtualization Reference Model
Three major Components falls under this category in a virtualized environment:
1. GUEST:
• The guest represents the system component that interacts with the virtualization
layer rather than with the host.
• It consist of one or more virtual disk files, and a VM definition file.
• Virtual Machines are centrally managed by a host application that sees and
manages each virtual machine as a different application.
2. HOST:
• The host represents the original environment where the guest is supposed to be
managed.
• The operating system works as the host and manages the physical resource
management and the device support.
Virtualization Reference Model
3. VIRTUALIZATION LAYER:
• The virtualization layer is responsible for recreating the same or a different
environment where the guest will operate.
• It is an additional abstraction layer between a network and storage hardware,
computing, and the application running on it.
Characteristics of virtualized environment
• A virtualized environment is an IT setup where physical
hardware resources (CPU, memory, storage, network)
are converted into virtual resources using virtualization
software (like hypervisors).
• It allows multiple virtual machines (VMs) to run on a
single physical system efficiently.
Characteristics of virtualized environment
Key Characteristics
[Link] Sharing: One physical resource can be shared by many users
without interference.
[Link]: One virtual machine does not interfere with another, as every
virtual machine runs independently.
[Link]: Virtual machines can be created, modified, or deleted quickly
and easily.
[Link]: Businesses are able to quickly scale up or down based on
demand.
[Link]-Effectiveness: Hardware resources are utilized more efficiently,
reducing wastage.
Characteristics of virtualized environment
Key Characteristics
1. Resource Abstraction
• Physical hardware is hidden and presented as virtual resources.
• Multiple VMs can share the same physical hardware.
• Makes management easier and more flexible.
2. Isolation
• Each VM works independently with its own OS and applications.
• Failure or attack in one VM does not affect others.
• Improves security and reliability.
3. Resource Pooling / Sharing
• Physical resources are pooled and distributed across VMs.
• Improves hardware utilization and efficiency.
4. Scalability and Elasticity
• Resources can be increased or decreased based on demand.
• Helps handle workload changes easily.
Characteristics of virtualized environment
Key Characteristics
5. Hardware Independence
• VMs are not tied to specific hardware.
• Can be migrated between physical servers easily.
6. Consolidation
• Multiple VMs run on one physical server.
• Reduces the number of physical machines needed.
• Saves cost, power, and space.
7. Centralized Management
• Admins can manage multiple VMs from a single console.
• Makes monitoring and maintenance easier.
8. Automation
• VM deployment, scaling, and management can be automated.
• Reduces manual effort and errors.
Virtualization Types
Virtualization Types
1. Application Virtualization
• Allows applications to run without installing them on the user’s OS.
• Applications run in isolated environments or on remote servers.
• Example:
• Using Google Docs online without installing Microsoft Word locally is similar
in concept (remote app usage, though technically SaaS rather than pure app
virtualization).
• Microsoft App-V or VMware ThinApp allows applications to run without
installing them directly on the local system.
Virtualization Types
2. Network Virtualization
• Any computer network has hardware elements such as switches, routers, and
firewalls.
• An organization with offices in multiple geographic locations can have several
different network technologies working together to create its enterprise
network.
• Network virtualization is a process that combines all of these network
resources to centralize administrative tasks.
• Administrators can adjust and control these elements virtually without
touching the physical components, which greatly simplifies network
management.
Virtualization Types
• The following are two approaches to network virtualization.
1. Software-defined networking (SDN)
• It controls traffic routing by taking over routing management from data routing
in the physical environment.
• For example, you can program your system to prioritize your video call traffic
over application traffic to ensure consistent call quality in all online meetings.
2. Network function virtualization
• Network function virtualization technology combines the functions of network
appliances, such as firewalls, load balancers, and traffic analyzers that work
together, to improve network performance.
• Example: AWS VPC (Virtual Private Cloud). You create subnets and route
tables in software, without touching a physical router.
Virtualization Types
3. Desktop Virtualization:
• Desktop Virtualization is a technology in which a user’s desktop
environment (operating system, applications, and data) is hosted on a
centralized server or cloud data center, instead of running on the user’s
local computer.
• Desktop virtualization allows users to access their desktop environment
remotely from any device.
• How it works:
1. Desktop OS runs on a central server.
2. User accesses it through the internet.
• Example:
The employee uses the office desktop from home.
• Example: Amazon WorkSpaces:- It is a cloud-based Desktop Virtualization
service provided by AWS.
Virtualization Types
4. Storage Virtualization
• Storage Virtualization is a technique in cloud computing where multiple
physical storage devices (hard disks, SSDs, storage arrays) are combined and
managed as a single virtual storage unit.
• Instead of managing many separate storage devices, storage virtualization
hides the physical complexity and provides a logical (virtual) view of
storage.
• Users don’t need to know where the data is physically stored.
Example
•Amazon S3:
Users upload files to S3 without worrying about which disk or data center stores the data.
•Google Drive / OneDrive:
Storage looks like one folder, but data is spread across multiple servers.
Virtualization Types
5. Server Virtualization
• It is a technology in cloud computing where one physical server is divided into
multiple virtual servers, called Virtual Machines (VMs), using virtualization
software.
• Each virtual server works independently and can run its own operating system,
applications, and services, even though they all share the same physical
hardware.
• Concept (Simple Meaning)
• Instead of using one server for one task, server virtualization allows one powerful
server to perform many tasks at the same time by creating multiple virtual
servers.
It improves resource utilization and reduces hardware cost.
Example
•Amazon EC2: Multiple virtual servers are created on AWS data centers.
•Microsoft Azure Virtual Machines
•VMware ESXi in data centers
Virtualization Types
6. Data Virtualization:
• Data Virtualization is a technique where data from multiple, different data sources
is accessed and presented as a single unified view, without physically copying or
moving the data.
• The data remains in its original locations, but users and applications can access it as
if it comes from one database.
• Concept (Simple Meaning)
• Data virtualization hides the complexity of data sources and allows users to see
and use data in real time from different systems through one interface.
No need to store duplicate data. Example
•A company has:
• Sales data in an Oracle database
• Customer data in MySQL
• Logs in cloud storage
Using data virtualization, all data can be viewed together in one report.
Quiz !!!
Q.1. Virtualization in cloud computing mainly helps in:
A. Increasing hardware cost
B. Better resource utilization
C. Reducing network speed
D. Increasing power consumption Correct
Option B
Quiz !!!
2. Which software is used to create and manage
virtual machines?
A. Compiler
B. Hypervisor
C. Firewall Correct
D. Load balancer Option B
Quiz !!!
3. Which type of virtualization divides a physical server
into multiple virtual servers?
A. Storage virtualization
B. Network virtualization
C. Server virtualization Correct
Option C
D. Data virtualization
Quiz !!!
4. Which cloud service is an example of server virtualization?
A. Amazon S3
B. Amazon EC2
C. Google Drive
D. Dropbox
Correct
Option B
Quiz !!!
5. A thin client mainly performs:
A. Heavy data processing
B. Local storage management
C. Display and input operations Correct
Option C
D. Database operations
Quiz !!!
6. Which is NOT an advantage of virtualization?
A. Reduced hardware cost
B. Better scalability
C. Increased power consumption
Correct
D. Improved resource utilization Option C
Quiz !!!
7. Which virtualization type provides a unified
view of data from multiple sources?
A. Server virtualization
B. Desktop virtualization Correct
C. Data virtualization Option C
D. Network virtualization
Quiz !!!
8. Which of the following is an example of desktop
virtualization?
A. Docker
B. Amazon WorkSpaces Correct
Option B
C. Amazon S3
D. Hadoop
Quiz !!!
9. Before virtualization, a physical server was mainly
used to run:
A. Multiple operating systems
B. Only one operating system Correct
C. Only applications Option B
D. Virtual machines
Quiz !!!
10. Main reason virtualization was introduced
was to solve:
A. Network security issues
B. Hardware underutilization Correct
C. Software bugs Option B
D. Internet speed problems
Virtualization Technologies: VMware, Hyper-V, KVM, Xen
• What is Virtualization? What is a Hypervisor?
• Virtualization is the technology that A hypervisor is software that creates and runs
virtual machines.
allows multiple virtual machines
Types of Hypervisors
(VMs) to run on a single physical Type 1 (Bare Metal)
computer. •Runs directly on hardware
• It uses a special software called a •High performance
hypervisor to create and manage •Used in data centers
virtual machines. Examples: Hyper-V, VMware ESXi, Xen
Benefits
•Better hardware utilization
•Server consolidation Type 2 (Hosted)
•Isolation between systems •Runs on top of an operating system
•Easier for beginners
•Easy testing and deployment
•Used for desktop virtualization
•Cost reduction Examples: VMware Workstation, VirtualBox
Virtualization Technologies: VMware
Continue..
• 1. VMware is the industry titan.
• In a professional data center, you’ll likely see VMware ESXi, Features
which is a "Type 1" (bare-metal) hypervisor. •High performance
• Key Features: Known for its high performance, "vMotion" •Mature ecosystem
(moving a running VM from one server to another without •Strong enterprise support
downtime), and a robust management ecosystem •Live migration (vMotion)
(vSphere). •Snapshot support
• Student Context: You’ve probably used VMware
Workstation or Player. These are "Type 2" hypervisors Popular VMware Products
because they run on top of an OS like Windows or Linux. •VMware Workstation
• Pros: Extremely stable, best-in-class GUI, and widely used (desktop)
in enterprise environments. •VMware ESXi (server)
• Cons: Licensing can be very expensive for businesses. •VMware vSphere (enterprise)
Virtualization Technologies: Hyper-V
Continue..
• 2. Hyper-V is Microsoft’s native virtualization solution. It is
unique because it is technically a Type 1 hypervisor, but it
launches alongside the Windows OS.
• Key Features: It uses "enlightenments," which allow the
guest OS to know it’s being virtualized, improving Features
efficiency. It is deeply integrated into Windows Server and •Built into Windows
Windows 10/11 Pro. •Supports live migration
•Good integration with Windows
ecosystem
• Pros: "Free" if you already own a Windows license;
•Supports containers and VMs
excellent support for Windows guest operating systems.
• Cons: Historically, Linux support was secondary (though
it has improved drastically). How to Use it…..Click Here!!!
Virtualization Technologies: KVM
Continue..
3. KVM (Kernel-based Virtual Machine)
• KVM is the "open-source king." It is a module within
the Linux kernel that effectively turns Linux into a Features
Type 1 hypervisor. •Fully open source
• Key Features: Since it's part of Linux, it benefits •High performance
from every kernel update and has massive •Hardware virtualization support
community support. It’s the backbone of •Used in cloud platforms
OpenStack and many cloud providers (like Google Used By
•Google Cloud
Cloud).
•Amazon Web Services (partially)
• Pros: Free, open-source, and extremely lightweight.
•Red Hat virtualization
• Cons: Can have a steeper learning curve (often
managed via command line or tools like virt-
manager).
Virtualization Technologies: Xen
Continue..
• Xen is an open-source Type-1 (bare-metal)
hypervisor that allows multiple operating systems
to run on the same physical machine safely and
efficiently.
• It runs directly on hardware, not on top of an
operating system.
Key Features of Xen
• Type-1 Hypervisor (runs directly on
hardware)
• High performance virtualization
• Strong isolation between virtual
machines
• Supports paravirtualization and
hardware virtualization
• Open source and secure
• Used heavily in cloud computing
Virtualization Technologies: Xen
Continue..
• Xen uses a Type-1 (bare-metal)
hypervisor, which runs directly on
hardware and manages virtual
machines efficiently.
Main Layers
1️⃣ Physical Hardware
•CPU
•RAM
•Disk
•Network
This is the real machine where Xen is
installed.
Virtualization Technologies: Xen
Continue..
2️⃣ Xen Hypervisor (Core Layer)
•Very thin layer above hardware 4️⃣ DomU (Guest Domains / VMs)
•Handles: These are normal virtual machines.
• CPU scheduling Each DomU contains:
• Memory management •Guest OS (Linux/Windows)
• VM isolation •Applications
•Does NOT contain device drivers. •Front-end drivers
Think of it as the traffic controller. They request resources from Dom0.
3️⃣ Dom0 (Control Domain) — Most Important
Dom0 is a privileged virtual machine that:
•Contains device drivers
•Manages VM creation and deletion Xen is a powerful open-source Type-1
•Handles I/O for guests hypervisor known for high performance
•Runs management tools and strong isolation, widely used in
Key point: cloud and enterprise virtualization.
Xen hypervisor is small
Dom0 does heavy work
Xen vs Other Hypervisors (Quick Comparison)
Continue..
Feature Xen VMware ESXi Hyper-V
Type Type-1 Type-1 Type-1
Included with
Cost Open source Commercial
Windows
Performance Very high Very high High
Ease of use Medium Easy Easy
Cloud usage Very popular Popular Popular
Windows
Best for Research & cloud Enterprise
environments
Virtual Machine (VM) Advantages
Continue..
Q. What is a VM?
A Virtual Machine is a software-based computer that 3. Multiple OS Support
runs its own operating system and applications on •Run Windows, Linux, etc., on same hardware.
shared physical hardware. •Useful for testing environments.
1. Isolation
•Each VM is independent. 4. Snapshot and Backup
•Failure in one VM does not affect others. •Take VM snapshot at any time.
•Improves security. •Easy rollback after errors.
Example: If one student’s VM crashes, others Example: Before software installation, take
continue working. snapshot → revert if failure.
2. Hardware Independence 5. Better Resource Utilization
•VM can run on different physical machines. •Physical resources shared efficiently.
•Easy portability. •Reduces idle hardware.
Example: Move a VM from one server to another
without reinstalling OS.
VM Migration
Continue..
Q. What is VM Migration?
VM migration is the process of moving a running
virtual machine from one physical host to another.
Two types:
1. Live migration (no downtime)
2. Cold migration (VM stopped)
Advantages of VM Migration
1. Zero or Minimal Downtime
•Live migration keeps services running. 3. Hardware Maintenance
•Improver user experience. •Physical server can be repaired without
Real example: Cloud providers move VMs shutting down services.
during maintenance without users noticing. 4. Disaster Avoidance
•Move VMs away from failing hardware.
2. Load Balancing 5. Energy Optimization
•Move VMs from overloaded server to underloaded •Consolidate VMs at night and shut down
one. extra servers.
•Maintains performance.
VM Consolidation
Continue..
What is VM Consolidation?
VM consolidation means running many
virtual
machines on fewer physical servers.
Goal: Reduce number of physical
machines.
Advantages of VM Consolidation
1. Reduced Hardware Cost
•Fewer servers needed.
•Lower capital expenditure.
2. Lower Power and Cooling Cost
•Data centers save electricity.
4. Space Saving
•Environment friendly (green IT).
•Fewer racks in data center.
3. Better Resource Utilization
5. Simplified Infrastructure
•Earlier: servers used only 10–20%.
•Easier to manage fewer physical machines.
•After consolidation: up to 70–80%.
VM Management
• VM Management refers to the Key Functions of VM Management:
process of creating, configuring,
monitoring, controlling, and [Link]: Rapid creation and deployment of new
maintaining virtual machines virtual machines using templates.
throughout their life cycle in a [Link]: Allocating and adjusting CPU, memory,
virtualized environment. storage, and network settings.
• It is performed using hypervisors [Link]: Tracking VM performance parameters such
and management tools to ensure as CPU usage, memory usage, and uptime.
efficient utilization of resources [Link]: Moving VMs between physical hosts for load
and reliable system performance. balancing and maintenance.
[Link] and Backup: Capturing VM state and
protecting data for recovery purposes.
[Link] Management: Controlling access, applying
patches, and ensuring VM isolation.
VM Management
Continue..
Advantages of VM Management
1. Centralized Control
•Manage many VMs from one console.
•Easy administration.
2. Rapid Provisioning
•New VM created in minutes.
•No need to buy new hardware.
Example: Developer needs test server → create
VM in 5 minutes.
3. Automation
•Automatic scaling
•Auto backup
•Auto load balancing
4. Monitoring and Reporting
•Track CPU, RAM, disk usage. 5. Easy Cloning
•Detect problems early. •Copy VM templates quickly.
•Useful in labs and classrooms.
Disadvantages of Virtualization
Continue..
1. Performance Overhead
• Virtualization adds a hypervisor layer between hardware and OS.
• This can cause slightly lower performance compared to a physical
machine.
2. Single Point of Failure
• If the physical host fails, all virtual machines on that host stop.
• Can cause major service disruption.
3. High Initial Setup Cost
• Requires:
Powerful servers
Storage systems
Skilled administrators
• Enterprise tools can be expensive.
4. Management Complexity
• Managing many VMs can become complicated.
• Requires expertise in: Networking, Storage, Hypervisors
• Troubleshooting can be harder than physical systems.
Disadvantages of Virtualization
Continue..
5. Security Risks
• Possible threats include: Hypervisor attacks, VM escape, Inter-VM attacks
• If hypervisor is compromised → all VMs at risk.
6. Resource Contention
• Multiple VMs share the same CPU, RAM, and disk.
• Heavy load from one VM can affect others.
8. Licensing Issues
• Some software licenses are complex in virtual environments.
• May increase compliance cost.
9. Hardware Compatibility Issues
• Some specialized hardware: GPUs, USB devices, Real-time devices, may not
virtualize easily.
10. Backup and Recovery Complexity
• VM backups require careful planning.
• Snapshots are not full backups.
• Large VM images take time to restore.
Quiz !!!
Q1. What was a primary issue with traditional
computing environments before the adoption of
virtualization?
Correct Option
A. Limited flexibility, making it hard to deploy or migrate applications B
effectively.
B. Significant underutilization of physical server resources.
C. The inability to run even a single application on one server due to hardware
limitations.
D. Excessive reliance on virtual machines for core business operations.
Quiz !!!
Q2. A university needs the highest performance and direct
hardware access. Which hypervisor is most suitable?
A. Hosted hypervisor like Oracle VirtualBox
B. Application-based hypervisor
C. Bare-metal hypervisor such as VMware
ESXi
D. Type 2 hypervisor Correct
Option C
Quiz !!!
Q3. Which cloud service model provides virtualized
computing resources over the internet?
a) IaaS
b) PaaS
c) SaaS
Correct Option
A
d) DBaaS
Quiz !!!
Q4. Which layer of the virtualization reference model is
responsible for managing hardware resources and
distributing them among multiple virtual machines?
a) The Guest OS Layer
b) The Hypervisor Layer
c) The Application Layer
Correct Option
B
d) The User Interface Layer
Quiz !!!
Q5. Which characteristic of a virtualized environment
ensures that a failure in one virtual machine does not
impact the operation of others on the same host?
a) Isolation
b) Partitioning
c) Hardware Independence Correct Option
A
d) Encapsulation
Quiz !!!
Q6. Which technology example is an open-source hosted
hypervisor that is integrated directly into the Linux kernel?
a) Xen
b) Microsoft Hyper-V
c) VMWare ESXi
Correct Option
d) KVM (Kernel Based Virtual Machine) D
Quiz !!!
Q7. What is the primary goal of VM Consolidation in a data
center environment?
Correct Option
a) Increasing the number of physical server. C
b) Eliminating the need for a hypervisor
c) Reducing energy consumption and hardware footprint
d) Simplifying the guest Operating System
Quiz !!!
Q8. VM Migration (specifically Live Migration) allows an
administrator to move a running VM between hosts. What is the
most significant advantage of this process?
a) Reducing the need for network bandwidth
Correct Option
b) Changing the VM’s operating system automatically D
c) Increasing the storage capacity of the VM
d) Zero-downtime maintenance of physical hardware
Quiz !!!
Q9. How does Microsoft Hyper-V differ from Type-2
hypervisors like Oracle VirtualBox?
a) Hyper-V does not support VM snapshots
b) Hyper-V is a Type-1 (bare-metal) hypervisor Correct Option
B
c) Hyper-V requires modified Guest Oss only
d) Hyper-V is only for Linux guest systems.
Quiz !!!
Q10. Which technology is an open-source Type 1
hypervisor used by many cloud providers?
A) VMware vSphere
B) Microsoft Hyper-V
Correct Option
D
C) VirtualBox
D) Xen