🖥️ Virtualization & Containers
📌 Overview
Virtualization is the core technology behind Cloud Computing. It allows a single physical server to be sliced into multiple "virtual" servers, each isolated from the others.
1. How Virtualization Works (The Hypervisor)
A Hypervisor is software that sits on top of physical hardware and creates/manages Virtual Machines (VMs).
- Azure's Hypervisor: Modified version of Microsoft Hyper-V.
- Role:
- Assigns Memory, CPU, and Storage to each VM.
- Ensures isolation (VM A cannot see VM B's data).
- Enables "Multi-tenancy" (Multiple customers on one physical rack).
2. Virtual Machines (VMs) 🆚 Containers
💻 Virtual Machines (IaaS)
- Structure: Hardware -> Hypervisor -> Guest OS -> App.
- Heavyweight: Each VM has a full Operating System (Windows/Linux) kernel.
- Boot Time: Minutes.
- Azure Service: Azure Virtual Machines.
📦 Containers (PaaS/Serverless)
- Structure: Hardware -> OS -> Container Engine -> App.
- Lightweight: Containers share the Host OS kernel. They only package the app and dependencies (libs).
- Boot Time: Seconds.
- Pros: Greater density (run more apps on less hardware), Portability (runs same on laptop vs cloud).
- Azure Services:
- Azure Container Instances (ACI): Run a container without managing servers (Serverless).
- Azure Kubernetes Service (AKS): Orchestration for managing thousands of containers.
- Azure Container Apps: Serverless container platform for microservices.
3. Architecture Comparison
VIRTUAL MACHINE (IaaS) CONTAINER (PaaS / Serverless)
====================== =============================
+-----------------------+ +-----------------------+
| App 1 | App 2 | | App 1 | App 2 |
+------------+----------+ +----------+------------+
| Guest OS | Guest OS | | Container Engine |
+------------+----------+ | (Docker) |
| Hypervisor | +-----------------------+
+-----------------------+ | Host OS |
| Physical Server | +-----------------------+
+-----------------------+ | Physical Server |
+-----------------------+💡 Hinglish Explanation (Virtualization)
Hypervisor (The Magician)
- Hinglish: Socho aapke paas ek bada Cake (Physical Server) hai. Hypervisor woh chaku (knife) hai jo cake ko barabar 4 hisson mein katata hai. Har hissa (VM) samajhta hai ki woh pura cake hai, par asal mein woh bas ek tukda hai.
Virtual Machine (VM)
- Hinglish: Ek poora computer doosre computer ke andar. Iska apna Windows/Linux hota hai. Thoda bhaari (heavy) hota hai aur start hone mein time leta hai.
Container
- Hinglish: Yeh Tiffin Box jaisa hai. Khana (App) wahi hai, par bartan (OS) alag se nahi lana padta. Sab log ek hi dining table (Host OS) share karte hain. Bohot halka aur fast hota hai.
💡 Exam Tips for AZ-900
- If asked about "Separation of environments using software" -> Virtualization.
- If asked about "Lightweight, shared kernel, rapid startup" -> Containers.
- Azure Kubernetes Service (AKS) is the standard for orchestration (managing) containers in production.