Cloud ComputingUnit 412 min read
Virtualization: Types, Techniques & Cloud Applications
Unit 4 of Cloud Computing explores virtualization—how a single physical resource (servers, storage, networks) is partitioned into multiple virtual instances, enabling cloud efficiency, cost savings, and scalability. This note covers hardware/software virtualization, hypervisors, virtual machines (VMs), containers, and
Core Concepts of Virtualization
1. What is Virtualization?
Virtualization is the creation of a virtual (rather than physical) version of a computing resource—such as a server, storage device, network, or operating system. It allows multiple virtual instances to run on a single physical machine, maximizing resource utilization and reducing costs.
Why is it essential in cloud computing?
- Resource pooling: Multiple users share the same physical infrastructure.
- Isolation: Virtual instances are independent, improving security and reliability.
- Scalability: Easily add or remove virtual resources without buying new hardware.
2. Types of Virtualization
Virtualization can be categorized based on the resource being virtualized. The most common types in cloud computing are:
A. Hardware Virtualization (Server Virtualization)
- Definition: Divides a single physical server into multiple virtual machines (VMs), each running its own OS and applications.
- How it works:
- A hypervisor (Type 1 or Type 2) allocates CPU, RAM, storage, and network resources to VMs.
- VMs are isolated but share the same hardware.
B. Storage Virtualization
- Definition: Pools physical storage from multiple network storage devices into a single virtual storage unit.
- How it works:
- Uses Storage Area Networks (SANs) or Network Attached Storage (NAS) to abstract storage management.
- Improves data availability and simplifies backups.
C. Network Virtualization
- Definition: Combines hardware and software network resources to create a single, unified virtual network.
- How it works:
- Uses software-defined networking (SDN) to dynamically allocate network resources.
- Enables multi-tenancy (multiple users share the same network infrastructure).
D. Desktop Virtualization (VDI - Virtual Desktop Infrastructure)
- Definition: Hosts a user’s desktop OS and applications on a central server, accessed remotely via thin clients.
- How it works:
- Users connect to their virtual desktops from any device (laptop, tablet, or even a simple terminal).
- Used in corporate IT to manage employee workstations centrally.
E. Application Virtualization
- Definition: Runs applications in an isolated environment without installing them on the host OS.
- How it works:
- Applications are streamed from a central server to user devices.
- Example: Citrix Virtual Apps allows running Windows apps on macOS or Linux.
3. Hypervisors: The Engine of Virtualization
A hypervisor (or Virtual Machine Monitor, VMM) is the software that creates, manages, and runs VMs. There are two main types:
| Type | Description | Examples | Use Case |
|---|---|---|---|
| Type 1 (Bare-Metal) | Runs directly on host hardware (no host OS). Higher performance, used in cloud/data centers. | VMware ESXi, Microsoft Hyper-V, Xen | Cloud providers (AWS, Azure) |
| Type 2 (Hosted) | Runs on top of a host OS (e.g., Windows, Linux). Easier to set up but slower. | Oracle VirtualBox, VMware Workstation | Local development, testing |
How a Hypervisor Works (Step-by-Step):
In the Real World
Virtualization powers every major cloud service and many Nepali apps. Here’s how:
eSewa & Khalti (Digital Payments)
- What it uses: Server virtualization (IaaS) to host multiple payment processing servers on a single physical machine.
- Why? Reduces costs, ensures high availability (even if one VM fails, others keep running), and scales during festivals (Dashain, Tihar).
Ncell & NTC (Telecom & Internet)
- What it uses: Network virtualization to create isolated virtual networks for different services (4G, VoIP, IoT).
- Why? Enables SD-WAN (Software-Defined Wide Area Network) for efficient data routing, reducing latency in calls and internet speeds.
Daraz & Pathao (E-commerce & Logistics)
- What it uses: Containerization (Docker + Kubernetes) for microservices (e.g., order processing, payment gateway, inventory).
- Why? Faster deployments, easier scaling during sales (e.g., Daraz’s "11.11" event), and cost savings.
Nepal Rastra Bank (NRB) & Commercial Banks
- What it uses: Desktop virtualization (VDI) for secure banking software access.
- Why? Employees access their desktops from anywhere, reducing IT overhead and improving cybersecurity.
Virtual Machines (VMs) vs. Containers
Both VMs and containers virtualize resources, but they differ in isolation, performance, and use cases.
| Feature | Virtual Machines (VMs) | Containers |
|---|---|---|
| Isolation Level | High (full OS virtualization) | Low (shares host OS kernel) |
| Performance | Slower (emulates hardware) | Faster (direct access to host OS) |
| Resource Usage | Higher (each VM has its own OS) | Lower (shares OS kernel) |
| Portability | Limited (VM format depends on hypervisor) | High (runs anywhere Docker/Kubernetes supports) |
| Use Cases | Running different OS (Windows + Linux on one server) | Microservices, CI/CD pipelines |
| Examples | VMware, VirtualBox, AWS EC2 | Docker, Kubernetes, LXC |
Worked Example: Hosting a Website on AWS
Using VMs (EC2 Instances):
- You launch an Amazon Machine Image (AMI) (a pre-configured VM).
- AWS hypervisor (Xen) allocates CPU, RAM, and storage.
- Pros: Full OS control, security isolation.
- Cons: Slower boot time, higher resource usage.
Using Containers (ECS/EKS):
- You deploy a Docker container with your web app (e.g., Node.js + Nginx).
- AWS Kubernetes (EKS) manages container orchestration.
- Pros: Faster scaling, lower cost, instant startup.
- Cons: Less isolation (if one container crashes, others may be affected).
4. Virtualization in Cloud Computing
Cloud providers like AWS, Azure, and Google Cloud rely heavily on virtualization to deliver IaaS (Infrastructure as a Service). Here’s how:
A. How Cloud Providers Use Virtualization
Multi-tenancy:
- A single physical server hosts VMs for multiple customers (e.g., an AWS EC2 instance for Company A and Company B on the same machine).
- Security: Each VM is isolated; a breach in one doesn’t affect others.
Auto-scaling:
- Cloud platforms dynamically allocate VMs based on demand.
- Example: During Daraz’s 11.11 sale, AWS automatically spins up more VMs to handle traffic spikes.
Disaster Recovery:
- VMs can be snapshotted and replicated across data centers.
- Example: If a Ncell data center fails, virtualized services can failover to a backup location.
B. Virtualization in Nepalese Context
Nepal Stock Exchange (NEPSE):
- Uses server virtualization to host trading platforms securely.
- Why? Ensures high availability during market hours (9:30 AM–3:30 PM).
Government Portals (e.g., e-Governance):
- Desktop virtualization (VDI) allows civil servants to access government applications from any device.
- Why? Reduces hardware costs and improves cybersecurity.
5. Advantages and Disadvantages of Virtualization
Advantages
✅ Cost Savings: Fewer physical servers needed (e.g., a single server can replace 10 old machines). ✅ Efficiency: Better resource utilization (CPU, RAM, storage). ✅ Scalability: Easily add/remove VMs or containers as needed. ✅ Disaster Recovery: Snapshots and backups simplify recovery. ✅ Flexibility: Run multiple OS (Windows, Linux, macOS) on one machine. ✅ Energy Efficiency: Reduces data center power consumption.
Disadvantages
❌ Complexity: Managing hypervisors and VMs requires expertise. ❌ Performance Overhead: VMs can be slower due to emulation. ❌ Security Risks: If the hypervisor is compromised, all VMs are at risk. ❌ Licensing Costs: Some OS licenses (e.g., Windows Server) require additional VM licenses. ❌ Vendor Lock-in: Some hypervisors (e.g., VMware) make migration difficult.
6. Real-World Virtualization Technologies
A. Hypervisors in Use Today
| Hypervisor | Type | Key Features | Best For |
|---|---|---|---|
| VMware ESXi | Type 1 | Enterprise-grade, high performance | Data centers, cloud providers |
| Microsoft Hyper-V | Type 1 | Integrated with Windows Server | Windows-based virtualization |
| Xen | Type 1 | Open-source, used by AWS, Citrix | Cloud infrastructure |
| KVM (Kernel-based VM) | Type 1 | Linux-based, high performance | Linux servers, open-source projects |
| Oracle VirtualBox | Type 2 | Free, easy to use | Local development, testing |
| VMware Workstation | Type 2 | Advanced features, paid | Desktop virtualization |
B. Containerization (Beyond VMs)
While VMs virtualize hardware, containers virtualize OS-level resources. Key tools:
- Docker: Lightweight containers for apps.
- Kubernetes (K8s): Orchestrates containerized applications at scale.
- LXC/LXD: Linux containerization (alternative to Docker).
Example: Running a Web App with Docker
Exam Tip
What to Expect in TU/PU Exams
Definitions & Comparisons:
- Expect questions on VM vs. Container, Type 1 vs. Type 2 hypervisors, and IaaS vs. PaaS virtualization.
- Example Question: "Differentiate between hardware virtualization and application virtualization with examples."
Diagrams & Worked Examples:
- Draw a hypervisor architecture or a VM lifecycle diagram.
- Example Question: "Trace how a user request is processed in a virtualized cloud environment (show hypervisor, VM, and resource allocation)."
Real-World Applications:
- Relate virtualization to Nepali companies (eSewa, Ncell, Daraz) or global cloud providers (AWS, Azure).
- Example Question: "How does Daraz use containerization to handle traffic during sales events?"
Advantages/Disadvantages:
- Be ready to list pros and cons of VMs vs. containers or cloud vs. on-premise virtualization.
- Example Question: "Why would a bank prefer VMs over containers for their core banking system?"
Short Answer & True/False:
- True/False: "Containers are more secure than VMs." (False—VMs have better isolation.)
- Short Answer: "Name two Type 1 hypervisors used in cloud computing." (AWS Xen, VMware ESXi.)
Final Checklist Before Exam
✔ Can you define virtualization and its types? ✔ Can you compare VMs and containers with a table? ✔ Can you draw a hypervisor workflow (sequence diagram)? ✔ Can you explain how eSewa/Khalti uses virtualization? ✔ Can you list 3 advantages and 2 disadvantages of virtualization? ✔ Can you differentiate Type 1 and Type 2 hypervisors?
Based on the TU BIM syllabus for Cloud Computing (IT277), unit 4.
Discussion
Loading…