UNIT-II: Virtualization
Introduction, Characteristics of virtualized environments: Increased security, Managed
execution, Portability Taxonomy of virtualization techniques: Execution virtualization, other types
of virtualizations, Virtualization and cloud computing, Pros and cons of virtualization:
Advantages of virtualization, The other side of the coin: disadvantages, Technology examples:
Xen: para virtualization, VMware: full virtualization, Microsoft Hyper-V.
Virtualization is the process of creating a virtual (rather than physical) version of computing
resources such as servers, storage, operating systems, or networks, using specialized software.
It allows multiple virtual environments to run on a single physical machine, making better
use of resources and improving flexibility and efficiency.
● Virtualization is a technology that allows a single computer to act like multiple machines.
● It uses software to create virtual versions of resources like hardware, letting different
operating systems and applications run on the same physical computer at the same
time.
● This improves efficiency and flexibility.
● Functionality- Virtualization lets multiple customers or organizations share a single
physical resource. It does this by giving a logical name to physical storage and directing
users to that resource when needed.
Key Components
● Host Machine: The physical machine on which the virtual environment is created.
● Guest Machine: The virtual machine (VM) that operates within the host machine
Role in Cloud Computing
Virtualization is important in cloud computing because it helps use physical resources more
efficiently.
1. Efficient Use of Resources: It divides a single physical server into multiple virtual
machines (VMs), making better use of the hardware.
2. Scalability: Cloud services can easily grow or shrink by adding or removing virtual
machines as needed.
3. Cost Savings: Businesses don’t need to buy lots of physical servers, which lowers
costs. They can rent virtual resources instead.
4. Flexibility: Virtual machines can be quickly created or removed, making it easier to test
and launch new services.
5. Snapshot and Cloning: snapshots of VMs can be taken for backups, testing, or rolling
back changes.
6. Simplified Management: Tools like VMware and Hyper-V Manager help you easily
monitor and manage virtualized resources.
Characteristics of Virtualized Environments
1. Increased Security
○ Virtualization creates isolated environments called Virtual Machines (VMs),
each separated from others and the host system.
○ This isolation means that if one VM is attacked or infected by malware, the threat
typically does not spread to other VMs or the host, enhancing overall system
security.
○ Virtualization also supports sandboxing, which allows testing or running
potentially risky software safely within a VM without affecting the main system.
○ Security policies, monitoring tools, and encryption can be applied to each VM
individually, providing granular security control.
2. Managed Execution
○ The hypervisor (or virtual machine monitor) is responsible for running and
managing multiple VMs on a single physical machine.
○ It handles resource allocation like CPU cycles, memory, disk I/O, and network
bandwidth among VMs based on priority or demand.
○ The hypervisor can schedule VM execution, pause, resume, or migrate VMs
between hosts without downtime (live migration).
○ It enforces policies and restrictions, ensuring that VMs cannot interfere with
each other or the host OS.
○ It also facilitates advanced features like snapshots (saving VM states) for
backup or rollback.
3. Portability
○ VMs are encapsulated as files or sets of files representing the entire system’s
state (including OS, applications, and data).
○ This encapsulation makes VMs highly portable — they can be easily copied,
moved, or backed up to different physical machines or data centers.
○ Portability enables flexible deployment: running the same VM on different
hardware platforms or cloud environments without compatibility issues.
○ This makes disaster recovery, system cloning, and scaling more efficient and less
error-prone.
○ It supports hybrid cloud strategies where workloads move seamlessly between
on-premises and cloud infrastructure.
Taxonomy of Virtualization Techniques
Virtualization techniques are classified based on how they execute and manage virtualized
systems.
1. CPU Virtualization
○ Focuses on virtualizing the central processing unit (CPU) to allow multiple
operating systems or applications to run simultaneously on a single physical
CPU.
○ The hypervisor manages the CPU resources by scheduling and allocating CPU
cycles among virtual machines or processes.
○ Allows efficient sharing of CPU cores and supports hardware-assisted
virtualization features like Intel VT-x or AMD-V.
○ Enables safe execution of multiple OS instances by controlling privileged
instructions and CPU states.
○ Examples: Intel VT-x, AMD-V, and hypervisors like VMware, KVM, Xen utilize
CPU virtualization.
2. Execution Virtualization (Full Virtualization)
○ The hypervisor emulates the entire hardware environment, allowing guest OSs to
run unmodified.
○ It manages privileged instructions and hardware access, creating fully isolated
VMs.
○ Commonly used in data centers to run multiple OSs on shared hardware.
○ Examples: VMware ESXi, Microsoft Hyper-V, Xen, KVM.
3. Operating System-Level Virtualization (Containerization)
○ Virtualizes at the OS level by isolating multiple user-space instances called
containers.
○ Containers share the host OS kernel but run in isolated environments.
○ Lightweight and fast compared to full VMs.
○ Examples: Docker, LXC, OpenVZ.
4. Storage Virtualization
○ Combines multiple physical storage devices into a unified virtual storage pool.
○ Improves management, scalability, and utilization of storage resources.
○ Enables advanced features like snapshots, replication, and thin provisioning.
○ Used in SANs and NAS environments.
5. Network Virtualization
○ Abstracts physical network resources to create virtual networks independent of
hardware.
○ Supports virtual switches, routers, firewalls, and load balancers in software.
○ Enables flexible network segmentation and traffic control.
○ Examples: VLANs, SDN, VXLAN.
6. Desktop Virtualization
○ Runs desktop environments on centralized servers, accessed remotely by users.
○ Simplifies management and centralizes security and data storage.
○ Examples: VMware Horizon, Citrix Virtual Apps and Desktops.
Pros of Virtualization (SCALES)
1. Security
○ Virtual Machines (VMs) operate in isolated environments, meaning if one VM is
compromised, others remain protected.
○ This isolation helps contain malware or attacks, improving overall system
security.
○ Enables sandbox environments to safely test applications without risk to the host.
2. Cost-efficiency
○ Virtualization reduces the need for multiple physical servers, lowering hardware
and maintenance costs.
○ Saves energy and cooling expenses by consolidating workloads onto fewer
machines.
○ Reduces capital expenditure (CapEx) and operational expenditure (OpEx).
3. Agility
○ New VMs can be quickly created, configured, or cloned, speeding up deployment
and development cycles.
○ Supports rapid provisioning of resources to meet changing business demands.
4. Load balancing
○ Virtualization platforms can dynamically distribute workloads across physical
resources.
○ This ensures better utilization and avoids overloading any single server.
5. Easy management
○ Centralized tools allow admins to manage, monitor, and maintain multiple VMs
from a single interface.
○ Simplifies backups, patching, and system updates.
6. Scalability
○ Resources like CPU, memory, and storage can be easily adjusted (scaled up or
down) based on VM needs without physical changes.
○ Supports business growth and fluctuating workloads efficiently.
Cons of Virtualization (PERILS)
1. Performance overhead
○ Virtualization introduces an additional software layer (the hypervisor), which can
cause some loss of raw hardware performance.
○ I/O operations and CPU instructions might run slower compared to running
directly on physical hardware.
2. Energy use
○ While it consolidates hardware, running many VMs densely on a single host may
increase overall power consumption and heat output, needing more cooling.
3. Resource contention
○ Multiple VMs share the same physical resources (CPU, memory, network, disk).
○ If many VMs demand heavy resources simultaneously, performance may
degrade due to contention.
4. Infrastructure complexity
○ Setting up and managing virtual environments requires specialized skills and
knowledge.
○ Troubleshooting issues can be more complex due to abstraction layers.
5. Licensing costs
○ Some virtualization solutions and guest OS licenses can be expensive.
○ Licensing models can be complex, leading to unexpected costs.
6. Security risks
○ If the hypervisor or VM configurations are not properly secured, vulnerabilities
may arise.
○ Virtualization can introduce new attack vectors such as VM escape, where
malware breaks out of a VM to attack the host.
Hypervisor- A hypervisor is a software program used to create, run, and manage one or more
virtual machines (VMs) on a computer.
It enables virtualization by sharing hardware resources from the host operating system (OS)
while keeping VMs isolated from one another.
Key Functions of a Hypervisor
● Creates and runs virtual machines (VMs).
● Shares hardware resources such as CPU,memory, and storage among VMs.
● Ensures that VMs operate independently of the host OS.
● Acts as a Virtual Machine Monitor (VMM), forming the virtualization layer.
● Manages and monitors virtual machine performance.
Types of Hypervisors
1. Type-1 Hypervisors (Native/Bare Metal Hypervisors)
● Run directly on host hardware without a traditional operating system.
● Manage both the hardware and guest operating systems efficiently.
● Used in enterprise environments for high performance and security.
● Examples:
○ VMware ESXi
○ Microsoft Hyper-V
○ Citrix XenServer
○ KVM (Kernel-based Virtual Machine)
2. Type-2 Hypervisors (Hosted Hypervisors)
● Run on top of a host operating system (Windows, Linux, macOS).
● Rely on the host OS to manage hardware resources.
● Easier to install and use, making them ideal for personal and testing environments.
● Examples:
○ Oracle VirtualBox
○ VMware Workstation
○ Parallels Desktop
○ QEMU
Xen Hypervisor
Xen is an open-source, Type-1 hypervisor that supports para-virtualization and full
virtualization. It is widely used in cloud computing platforms, including Amazon Web
Services (AWS).
Key Features of Xen
● Initially designed for para-virtualization, but now supports full virtualization.
● Uses hardware-assisted virtualization (Intel VT-x, AMD-V) to run unmodified guest
OSes like Windows.
● Supports both para-virtualization (PV) for modified OSes and hardware-assisted
virtualization (HVM) for unmodified OSes.
● Lightweight and efficient, making it ideal for large-scale cloud deployments.
Architecture of Xen
1. Hardware Layer (Bottom Section)
This layer includes the physical system's hardware:
● CPU – Executes instructions.
● Memory (RAM) – Stores running programs.
● Disk (HDD/SSD) – Provides storage for data and OS.
● Network/PCI Devices – Handles network communication and peripheral devices.
● The Xen Hypervisor runs directly on this hardware (bare metal) to manage VMs.
2. Xen Hypervisor Layer (Second Section)
● Core of Virtualization: The main part of Xen that controls virtual machines (VMs).
● No Built-in Interface: Needs Dom0 (a special VM) to manage other VMs.
● Manages Resources: Controls CPU, memory, storage, and network for VMs.
● Efficient Sharing: Ensures multiple VMs can use hardware smoothly..
3. Guest Virtual Machines (Third Section: Dom0 & DomU)
This layer contains the virtual machines (VMs) running on Xen:
Dom0 (Control Virtual Machine)
● A special privileged VM that has direct access to hardware.
● Manages the entire Xen system and other guest VMs.
● Runs a management application to control other VMs.
● Provides device drivers that allow unprivileged VMs (DomU) to use hardware.
● Can create, delete, and manage virtual machines.
DomU (Unprivileged Virtual Machines)
● These are guest VMs created by Dom0.
● Rely on Dom0 for hardware access and virtualized resources.
● Each DomU runs its own operating system (Linux, Windows, etc.).
● Runs applications just like a normal physical machine.
● Cannot access hardware directly but communicates through Dom0.
Benefits of Xen
● Lightweight and efficient – Minimal overhead.
● Supports both Windows and Linux VMs.
● High availability and fault tolerance.
● Optimized for cloud environments.
Examples of Xen in Action
● AWS (Amazon Web Services) – Runs thousands of VMs using Xen.
● Google Cloud Compute Engine (GCE) – Initially used Xen para-virtualization before
shifting to full hardware-assisted virtualization.
VMware: Leading Virtualization & Cloud Computing Provider
● VMware specializes in virtualization, enabling multiple operating systems and
applications to run on a single physical machine.
● Uses full virtualization, which duplicates hardware and presents it to the guest OS,
requiring no modifications.
● Provides a range of virtualization & cloud management solutions to create and
manage virtual IT environments.
Benefits of VMware
● Efficiency – Allows multiple virtual servers on a single machine, reducing hardware
costs and increasing utilization.
● Flexibility – Supports virtual environments for testing, development, and production.
● Disaster Recovery – Enables easier backup and replication of VMs for improved
disaster recovery.
● Scalability – Can scale as the organization grows, allowing the addition of more VMs
with minimal hardware investment.
● Automation – VMware tools automate IT processes, reducing administrative workload.
Key Features of VMware Virtualization
1. VMware vSphere (Server Virtualization)
VMware vSphere allows multiple virtual servers to run on one physical machine.
● VMware ESXi: A lightweight hypervisor that runs multiple VMs on a single server.
● VMware vCenter Server: A tool to manage multiple ESXi servers from one place.
● vMotion: Move VMs between servers without downtime.
● High Availability (HA): Automatically restarts VMs if a server fails.
● Distributed Resource Scheduler (DRS): Balances VM workloads across servers.
2. VMware Workstation & VMware Fusion (Desktop Virtualization)
Run multiple operating systems on one computer.
● Workstation (for Windows/Linux) & Fusion (for macOS): Run multiple OS environments
on a PC or Mac.
● Snapshots & Cloning: Save and restore VM states easily.
● Drag & Drop: Transfer files between host and VM.
3. VMware vSAN (Storage Virtualization)
Combines disk space from multiple servers to create a shared storage pool.
● Software-Defined Storage: No need for separate storage hardware.
● Automated Data Protection: Protects against hardware failures.
4. VMware NSX (Network Virtualization & Security)
Creates virtual networks independent of physical hardware.
● Micro-Segmentation: Provides strong security by isolating workloads.
● Load Balancing & VPN Support: Enhances network performance.
5. VMware Horizon (Virtual Desktops & Applications)
Delivers virtual desktops and apps to users on any device.
● Secure Remote Access: Work from anywhere.
● Centralized Management: Manage all desktops from a single console.
6. VMware Cloud Solutions (Hybrid & Multi-Cloud Support)
Run VMware on AWS, Azure, Google Cloud, or on-premises data centers.
● Multi-Cloud Support: Move workloads between private and public clouds.
● Disaster Recovery as a Service (DRaaS): Easily backup and restore VMs.
7. Security & Compliance
Protects virtual machines from cyber threats.
● VM Encryption: Ensures data security by preventing unauthorized access.
● Secure Boot & TPM 2.0: Prevents unauthorized changes to VMs.
8. Automation & AI-Driven Management
Automates IT tasks and optimizes system performance.
● vRealize Automation: Automates VM creation and IT workflows.
● AI-Powered Optimization: Automatically fixes performance issues.
Microsoft Hyper-V
● Hyper-V is a Type-1 (bare-metal) hypervisor developed by Microsoft.
● It allows multiple operating systems (Windows, Linux, etc.) to run as virtual
machines (VMs) on a single physical machine.
● The hypervisor sits between the hardware and guest OS, managing resources like
CPU, memory, storage, and networking.
● Available on Windows Server and Windows 10/11 Pro & Enterprise editions.
Hyper-V Architecture
Hyper-V is a virtualization platform from Microsoft that lets you create and run virtual machines
(VMs). It has four main layers:
1. Hardware Layer (Physical Machine)
● The real computer (host) with CPU, RAM, storage, and network adapters.
● Uses Intel VT-x & AMD-V to improve virtualization speed.
2. Hypervisor Layer
● The hypervisor runs directly on the hardware and manages VMs.
● It controls CPU, memory, and device access for each VM.
3. Root Partition (Main Operating System - Windows Server)
● This is the main OS that controls and manages VMs.
● Key components:
○ VM Management Service (VMMS) – Controls VM operations.
○ VMBus – A fast way for VMs to talk to the host.
○ WMI – Helps automate and manage VMs remotely.
4. Child Partitions (Guest VMs)
These are the virtual machines running inside Hyper-V. There are two types:
1. Optimized VMs ("Enlightened VMs")
○ Designed to work smoothly with Hyper-V.
○ Uses VMBus for faster performance.
2. Older VMs ("Unenlightened VMs")
○ Do not recognize Hyper-V, so they run slower using old methods.