CMP424 Cloud Computing and Virtualization

Cloud Computing and VirtualizationUnit 311 min read

Virtualization: Types, Techniques & Real-World Impact

Unit 3 of Cloud Computing and Virtualization explores the core concept of virtualization—how hardware, software, and network resources are abstracted and shared efficiently. This note covers types of virtualization (hardware, OS, application, storage, network), how virtual machines (VMs) work, resource pooling, isolati

What is Virtualization?

Virtualization is the creation of a virtual (rather than physical) version of something, such as a server, storage device, network, or operating system. It allows multiple virtual instances to run on a single physical resource, improving efficiency, flexibility, and cost-effectiveness.

Why Virtualize?

  • Resource Optimization: Run multiple workloads on a single machine.
  • Isolation: Isolate applications or services to prevent conflicts.
  • Scalability: Easily add or remove resources as needed.
  • Cost Reduction: Reduce hardware costs by consolidating workloads.

Types of Virtualization

Virtualization can be categorized based on what is being virtualized. Below is a comparison table of the five main types covered in the syllabus:

Type What is Virtualized? Examples Use Cases
Hardware Virtualization Physical hardware (CPU, RAM, storage) VMware ESXi, Microsoft Hyper-V Running multiple OS instances on one server.
OS (Operating System) Virtualization Operating system layer Docker (containerization), LXC Lightweight, portable applications.
Application Virtualization Applications (not OS) Citrix, Microsoft App-V Running legacy apps without OS changes.
Storage Virtualization Storage devices (HDD/SSD) VMware vSAN, NetApp Pooling storage across multiple disks.
Network Virtualization Network resources (routers, switches) Cisco ACI, VMware NSX Software-defined networking (SDN).

1. Hardware Virtualization (Most Common in Cloud)

Hardware virtualization allows multiple virtual machines (VMs) to run on a single physical server. The key components are:

  • Hypervisor (VMM): Manages VMs and allocates hardware resources.
  • Guest OS: Runs inside a VM (e.g., Windows, Linux).
  • Host OS: Manages the hypervisor (optional in Type-1 hypervisors).

How It Works:

  1. Physical Hardware (CPU, RAM, storage) is partitioned by the hypervisor.
  2. VMs are created, each with its own virtual CPU, RAM, and storage.
  3. Guest OS runs inside each VM, unaware it is virtualized.

Worked Example: eSewa’s Cloud Infrastructure

eSewa, Nepal’s leading digital payment platform, uses hardware virtualization to:

  • Host multiple services (payment processing, user dashboards, APIs) on AWS EC2 VMs.
  • Isolate high-traffic payment services from other applications to prevent crashes.
  • Scale resources dynamically during festivals (e.g., Dashain, Tihar) when transactions spike.

Visual: Hypervisor and VMs

flowchart TD
    A["Physical Server\n(CPU, RAM, Storage)"] --> B["Hypervisor\n(VMware ESXi)"]
    B --> C["VM 1\n(Guest OS: Ubuntu)"]
    B --> D["VM 2\n(Guest OS: Windows Server)"]
    B --> E["VM 3\n(Guest OS: Linux - eSewa App)"]

2. OS-Level Virtualization (Containers)

Unlike VMs, containers share the host OS kernel and run only the application and its dependencies. This makes them lighter and faster.

Key Differences: VMs vs. Containers

Feature Virtual Machines (VMs) Containers
Isolation Level High (full OS virtualization) Medium (shares host OS kernel)
Performance Slower (emulation overhead) Faster (direct OS access)
Resource Usage High (dedicated OS per VM) Low (shares OS resources)
Use Case Running multiple OS instances Microservices, lightweight apps
Examples VMware, Hyper-V Docker, Kubernetes

Worked Example: Pathao’s Ride-Hailing System

Pathao, Nepal’s ride-sharing app, uses Docker containers to:

  • Run microservices (e.g., user authentication, payment processing, GPS tracking) independently.
  • Deploy updates to one service (e.g., payment API) without affecting others.
  • Reduce costs by avoiding full VMs for each service.

Visual: Container vs. VM

Host OS (Linux)Shared KernelContainer Engine (Docker)Shared LibrariesContainers (Pathao Auth,Pathao Payment)Isolated NamespacesIsolated ProcessesIsolated Filesystems
OS-level virtualization: Containers share the host OS kernel but run isolated services.

3. Storage Virtualization

Storage virtualization pools physical storage from multiple devices into a single virtual storage unit. This improves data availability, performance, and management.

How It Works:

  1. Physical storage (HDDs, SSDs, NAS) is abstracted.
  2. Virtual storage layer presents a unified interface.
  3. Applications access data without knowing the physical location.

Worked Example: Ncell’s Cloud Backup

Ncell uses storage virtualization to:

  • Combine storage from multiple servers into a single virtual storage pool.
  • Ensure high availability for customer data (e.g., call logs, billing records).
  • Replicate data across regions to prevent loss during power outages.

Visual: Storage Virtualization

flowchart TD
    A["Physical Storage
(HDD 1, SSD 2, NAS)"] --> B["Storage Virtualization Layer
(VMware vSAN)"]
    B --> C["Virtual Storage Pool
(Ncell Customer Data)"]
    C --> D["Replicated Copy
(Backup Region)"]
    C --> E["Applications
(Billing System, CRM)"]
Added replication to show high availability in Ncell’s cloud backup.

4. Network Virtualization

Network virtualization decouples network services from hardware, allowing software-defined networking (SDN). This enables:

  • Logical network segmentation (e.g., separating Dev, Test, Prod environments).
  • Dynamic traffic routing (e.g., load balancing in Daraz’s order processing).
  • Multi-tenancy (e.g., NTC’s cloud-based network management for ISPs).

Worked Example: Daraz’s Order Fulfillment

Daraz uses network virtualization to:

  • Create isolated virtual networks for different regions (e.g., Kathmandu, Pokhara).
  • Route orders dynamically based on inventory and delivery zones.
  • Ensure low-latency for high-traffic periods (e.g., Black Friday sales).

Visual: Network Virtualization in Daraz

SDN Controller (VMware NSX)Kathmandu OrdersPokhara OrdersDaraz FulfillmentCustomer
Dynamic routing of orders via virtual networks in Daraz’s system.

In the Real World

  1. eSewa (Digital Payments)

    • What it uses: Hardware virtualization (AWS EC2 VMs) to isolate payment processing from user dashboards.
    • Why? Ensures security during high transaction volumes (e.g., Dashain) without downtime.
  2. Pathao (Ride-Hailing)

    • What it uses: Containerization (Docker + Kubernetes) for microservices like GPS tracking and payment APIs.
    • Why? Faster deployments and reduced costs compared to VMs.
  3. Ncell (Telecom)

    • What it uses: Storage virtualization to pool data from multiple servers for backup and disaster recovery.
    • Why? Ensures customer data (call logs, billing) is always available, even during power cuts.
  4. Daraz (E-Commerce)

    • What it uses: Network virtualization to dynamically route orders based on inventory and delivery zones.
    • Why? Reduces delivery times and handles Black Friday traffic spikes efficiently.
  5. NTC (Telecom Regulator)

    • What it uses: Network virtualization to manage ISP networks (e.g., Ncell, NTC) via software-defined policies.
    • Why? Simplifies network management and enforces regulatory compliance.

Key Concepts: Resource Pooling and Isolation

Resource Pooling

  • Definition: Combining multiple physical resources (CPU, RAM, storage) into a single pool that can be allocated dynamically.
  • Example: AWS EC2 allows users to allocate virtual CPUs and RAM from a shared pool without knowing the physical hardware.

Isolation

  • Definition: Ensuring that one VM/container cannot interfere with others (e.g., a crashed app in one VM doesn’t affect others).
  • Mechanisms:
    • Hardware-level: Hypervisor enforces strict separation.
    • OS-level: Containers use kernel namespaces and cgroups.

Visual: Resource Pooling in Cloud

Physical Servers (10)CPU, RAM, StorageHypervisor (AWS EC2)Resource AllocationVMs (User A, User B, User C)Strict SeparationIsolation MechanismsSecurity Policies
Hardware-level isolation: Hypervisor enforces resource separation between VMs.

Advantages and Disadvantages of Virtualization

Advantages Disadvantages
Cost Savings: Reduces hardware needs. Performance Overhead: VMs slower than bare metal.
Flexibility: Easy to scale up/down. Complexity: Requires skilled management.
Isolation: Prevents app conflicts. Security Risks: Hypervisor vulnerabilities.
Disaster Recovery: Snapshots and backups. Licensing Costs: Some OS licenses per VM.
Energy Efficiency: Fewer physical servers. Vendor Lock-in: Proprietary hypervisors.
022.54567.590Cost Savings85Scalability90Resource Utilization80Complexity60Security70
Student survey: Perceived impact of virtualization in cloud environments (scale: 0–100).

Exam Tip

  1. Define Virtualization Clearly:

    • Start with: "Virtualization is the process of creating a virtual (rather than physical) version of a resource..."
    • Mention abstraction, resource sharing, and isolation.
  2. Compare VMs and Containers:

    • VMs: Full OS, high isolation, slower.
    • Containers: Lightweight, share OS, faster.
    • Exam Tip: Use the table above in your answer for full marks.
  3. Real-World Applications:

    • Link concepts to Nepali companies (eSewa, Pathao, Ncell) or global platforms (AWS, Google Cloud).
    • Example: "Like Pathao uses Docker containers for microservices, a bank could use VMs to isolate customer databases."
  4. Diagrams Are Key:

    • Draw hypervisor-VM, container vs. VM, or storage/network virtualization diagrams.
    • Label clearly (e.g., "Hypervisor," "Guest OS," "Virtual Storage").
  5. Common Exam Questions:

    • "Explain hardware virtualization with an example." → Use eSewa/AWS.
    • "Compare VMs and containers." → Use the table.
    • "How does network virtualization help Daraz?" → Dynamic routing + isolation.
  6. Avoid Vague Answers:

    • ❌ "Virtualization is useful."
    • ✅ "Virtualization improves resource utilization by pooling physical hardware (e.g., AWS EC2) and isolating workloads (e.g., eSewa’s payment system)."

Based on the PU BE Computer (PU) syllabus for Cloud Computing and Virtualization (CMP424), unit 3.

Discussion

Loading…