Unit 2 Virtualization in Cloud Computing (2)
Unit 2 Virtualization in Cloud Computing (2)
Virtualization is the process of creating virtual versions of physical computing resources, such
as servers, storage devices, and networks. This abstraction enables multiple independent
systems to operate on a single physical machine, improving resource utilization, scalability,
and flexibility.
At its core, virtualization uses a software layer called a hypervisor to manage and allocate
hardware resources to virtual machines (VMs).
1. Physical Hardware:
o The foundation of virtualization is the physical hardware, including CPUs,
memory, storage, and network interfaces.
2. Hypervisor:
o The hypervisor acts as an intermediary between the physical hardware and the
virtual machines. It abstracts the hardware resources and allows multiple VMs
to share them.
3. Virtual Machines (VMs):
o A virtual machine is a software-defined instance that runs its own operating
system and applications, independent of other VMs.
sql
Copy code
+-----------------------+
| Application 1 | <-- Virtual Machine 1
| Operating System (OS) |
+-----------------------+
| Application 2 | <-- Virtual Machine 2
| Operating System (OS) |
+-----------------------+
| Application 3 | <-- Virtual Machine 3
| Operating System (OS) |
+-----------------------+
| Hypervisor | <-- Manages resource allocation
+-----------------------+
| Physical Hardware | <-- CPU, Memory, Storage, Network
+-----------------------+
Types of Virtualization
1. Server Virtualization:
o Divides a physical server into multiple VMs.
o Each VM can run a different operating system and applications.
o Use case: Efficient utilization of server hardware.
Diagram: Server Virtualization
+----------------------------------+
| CPU | Memory | Storage | Network |
+----------------------------------+
| | |
+-----------+ +-----------+ +-----------+
| VM 1 | | VM 2 | | VM 3 |
| OS & Apps | | OS & Apps | | OS & Apps |
+-----------+ +-----------+ +-----------+
2. Storage Virtualization:
o Combines multiple physical storage devices into a single logical unit.
o Use case: Simplified data management and efficient storage utilization.
+-------------------------------+
| Virtualized Storage | <-- Single logical view
+-------------------------------+
| Disk 1 | Disk 2 | Disk 3 | Disk 4 |
+-------------------------------+
3. Network Virtualization:
o Abstracts physical network components into virtual networks.
o Use case: Creates isolated and flexible network configurations.
+---------------------+
| Virtual Network |
+---------------------+
| | |
+---+---+---+---+---+---+
| VM 1 | VM 2 | VM 3 |
+-------+-------+-------+
4. Desktop Virtualization:
diff
Copy code
+---------------------------+
| Virtual Desktop Instances |
+---------------------------+
|
+-------+-------+
| Laptop | Tablet | Smartphone |
+-------+-------+-------------+
Benefits of Virtualization
+--------------------------------------------+
| Virtualization Layer (Hypervisors) |
| +---------+ +---------+ +---------+ |
| | VM 1 | | VM 2 | | VM 3 | |
| +---------+ +---------+ +---------+ |
+--------------------------------------------+
| Physical Infrastructure |
| +----------------------------------------+ |
| | Servers | Storage | Network | Databases| |
| +----------------------------------------+ |
+--------------------------------------------+
This diagram represents how virtualization serves as the backbone of cloud computing. CSPs
use hypervisors to manage resources efficiently, enabling them to offer IaaS, PaaS, and SaaS.
1. Resource Pooling: Virtualization enables providers to pool resources and share them
among multiple users efficiently.
2. Scalability: Supports dynamic allocation and scaling of resources based on demand.
3. Isolation: Ensures that VMs are isolated from each other, enhancing security and
reliability.
4. Cost Efficiency: Reduces the need for additional physical hardware and optimizes
utilization.
5. Flexibility: Facilitates the migration of workloads between servers or across data
centers.
1. Hardware Virtualization
Hardware virtualization creates virtual machines (VMs) that operate independently on a single
physical machine. It uses a hypervisor to abstract and allocate hardware resources.
Applications:
• Server consolidation
• Multi-operating system support
2. Software Virtualization
• Types:
1. Operating System Virtualization: Allows multiple isolated user-space
instances on a single OS kernel.
▪ Example: Docker, Kubernetes (Containerization).
2. Application Virtualization: Runs applications in virtual environments,
isolating them from the underlying system.
▪ Example: VMware ThinApp, Citrix XenApp.
Applications:
3. Storage Virtualization
Storage virtualization combines multiple physical storage devices into a single, unified virtual
storage pool.
• Types:
1. Block-Level Storage Virtualization: Abstracts storage at the block level,
making multiple storage devices appear as one.
▪ Example: Storage Area Network (SAN).
2. File-Level Storage Virtualization: Virtualizes storage at the file level,
allowing files to be managed independently of their physical storage location.
▪ Example: Network Attached Storage (NAS).
Applications:
4. Network Virtualization
Network virtualization abstracts physical network resources, creating multiple virtual networks
that operate independently.
• Types:
1. Internal Network Virtualization: Optimizes resources within a single physical
network.
2. External Network Virtualization: Combines multiple networks into one or
segments one network into multiple virtual networks.
Applications:
5. Desktop Virtualization
Desktop virtualization separates the desktop environment from the physical device, allowing it
to be accessed remotely.
• Types:
1. Virtual Desktop Infrastructure (VDI): Hosts desktop environments on a
central server.
▪ Example: VMware Horizon, Citrix Virtual Apps and Desktops.
2. Remote Desktop Services (RDS): Provides shared access to a single desktop
instance.
Applications:
• Remote work
• BYOD (Bring Your Own Device) policies
6. Data Virtualization
Data virtualization abstracts data from underlying systems to provide a unified view of data
without duplication or movement.
Applications:
7. GPU Virtualization
GPU virtualization allows multiple virtual machines to share a single GPU or provides
dedicated GPU access for each VM.
• Types:
1. Shared GPU Access: Multiple VMs share GPU resources.
2. Virtual GPU (vGPU): Provides each VM with virtualized GPU resources.
▪ Example: NVIDIA GRID.
Applications:
• AI/ML workloads
• High-performance gaming
8. Memory Virtualization
Memory virtualization combines physical memory from multiple systems into a single virtual
memory pool.
Applications:
• High-performance computing
• Memory-intensive applications
9. I/O Virtualization
I/O virtualization abstracts input/output devices, allowing multiple VMs to share physical I/O
resources.
Applications:
• Data-intensive workloads
• High-throughput applications
This technique combines various types of virtualization (hardware, network, storage, etc.) to
provide cloud services like IaaS, PaaS, and SaaS.
Applications:
Each virtualization technique plays a critical role in modern computing, particularly in cloud
environments, enabling efficient, scalable, and flexible use of resources.
Characteristics of Virtualization
Example: Multiple VMs running different operating systems on a single physical server.
2. Isolation
• Each virtual environment is isolated from others, ensuring that the failure or
performance issues of one VM do not affect others on the same host.
• Isolation improves security, as VMs cannot directly access each other's data or
processes.
Example: A VM running a test environment does not interfere with a production VM.
3. Encapsulation
• Virtual machines and virtual environments are encapsulated into files that contain all
the necessary components, including the operating system, applications, and data.
• These encapsulated VMs can be moved, copied, or backed up easily.
4. Scalability
5. Resource Sharing
• Virtualization allows multiple VMs to share the same physical hardware efficiently,
maximizing resource utilization.
• The hypervisor manages and allocates resources to ensure optimal performance.
Example: A server with 64 GB of RAM hosting multiple VMs with varying memory
requirements.
6. Hardware Independence
• Virtualization abstracts the hardware layer, making virtual machines independent of the
underlying physical hardware.
• VMs can run on different physical hardware without modification.
7. Fault Tolerance
• Virtualization platforms often include mechanisms for fault tolerance, such as live
migration, snapshots, and high availability.
• This minimizes downtime and ensures business continuity.
8. Portability
• Virtual machines are portable, meaning they can be moved between different physical
hosts or environments with minimal configuration changes.
• This portability enables disaster recovery and efficient load balancing.
9. Security
• Virtual machines can be easily snapshotted or backed up, preserving their state for
recovery or cloning purposes.
• Snapshots allow administrators to revert to a previous state in case of errors or failures.
• Resources such as CPU, memory, and storage can be dynamically allocated to VMs
based on their workload requirements.
• This ensures that resources are used efficiently without manual intervention.
14. Multi-Tenancy
Example: Public cloud providers like AWS hosting multiple customers on the same physical
server.
What is a Hypervisor?
Hypervisors play a crucial role in virtualization by isolating VMs from one another and
ensuring efficient resource sharing.
1. Resource Allocation:
o The hypervisor sits between the physical hardware and virtual machines.
o It allocates physical resources (like CPU, RAM, storage) to VMs based on their
requirements.
2. Isolation:
o The hypervisor ensures that VMs are isolated from each other, so the failure or
compromise of one VM does not affect others.
3. Abstraction:
o It abstracts the physical hardware, enabling VMs to be independent of the
underlying infrastructure.
4. Management:
o The hypervisor provides administrative tools to manage VMs, such as creating,
modifying, starting, stopping, and migrating VMs.
Types of Hypervisors
• Runs directly on the physical hardware without requiring a host operating system.
• Offers better performance, lower latency, and greater efficiency because it eliminates
the need for an intermediary OS layer.
Examples:
• VMware ESXi
• Microsoft Hyper-V
• Xen
• KVM (Kernel-based Virtual Machine)
Advantages:
Use Cases:
+---------------------+
| Virtual Machine 1 |
+---------------------+
| Virtual Machine 2 |
+---------------------+
| Virtual Machine 3 |
+---------------------+
| Type 1 Hypervisor|
+---------------------+
| Physical Hardware |
+---------------------+
• Runs on top of a host operating system, which manages the physical hardware.
• Ideal for personal or development use but has higher overhead compared to Type 1.
Examples:
• VMware Workstation
• Oracle VirtualBox
• Parallels Desktop
Advantages:
Disadvantages:
Use Cases:
Diagram:
+---------------------+
| Virtual Machine 1 |
+---------------------+
| Virtual Machine 2 |
+---------------------+
| Virtual Machine 3 |
+---------------------+
| Type 2 Hypervisor|
+---------------------+
| Host OS |
+---------------------+
| Physical Hardware |
+---------------------+
1. Performance Overhead:
o Virtualization can introduce slight performance overhead, especially in Type 2
hypervisors.
2. Complexity:
o Managing and configuring hypervisors in large-scale environments can be
complex.
3. Single Point of Failure:
o In the case of Type 1 hypervisors, if the physical host fails, all VMs on it are
affected unless fault tolerance is implemented.
Key Idea: Instead of creating separate servers for each customer, cloud providers run one
application that serves multiple users, reducing costs and improving scalability.
Characteristics of Multitenancy
• Resource Sharing – Multiple users share computing resources like databases, storage,
and servers.
• Data Isolation – Each tenant's data remains private and secure, even on shared
infrastructure.
• Cost Efficiency – Businesses save money by sharing cloud resources instead of
maintaining separate IT environments.
• Scalability – Cloud providers can easily scale services to accommodate multiple users.
• Customization – Each tenant can customize their experience without affecting others.
Example of Multitenancy
• Gmail & Google Drive: Multiple users (tenants) access Gmail and Google Drive, but
their emails and files are stored separately.
• Salesforce CRM: Different businesses use the same CRM platform with custom
configurations.
Application Programming Interfaces (API)
An Application Programming Interface (API) is a set of rules and protocols that allows
different software applications to communicate with each other. APIs act as messengers,
enabling applications to request and exchange data seamlessly.
Key Idea: APIs allow software components to interact and integrate, making cloud
computing services accessible to developers and businesses.
Types of APIs
• Cloud Storage APIs – Google Drive API, Dropbox API for file sharing.
• Social Media APIs – Facebook API, Twitter API for app integrations.
• Payment APIs – PayPal API, Stripe API for online transactions.
• Machine Learning APIs – Google Cloud AI API, IBM Watson API for AI-powered
applications.