cc unit 2
cc unit 2
Introduction to Virtualization
Virtualization is the technology that allows multiple operating systems and applications to run on the same
physical machine by creating virtual instances of hardware or software.
Virtualized environments have specific features that make them unique and efficient.
10 Key Points:
Increased Security:
Virtual machines (VMs) act as a protective layer between guest OS and host hardware.
Managed Execution:
Isolation:
Portability:
Virtualization techniques are categorized based on what they virtualize and how they virtualize. Here's a
breakdown:
3. Based on Technology
Execution Virtualization
Hypervisors, also called Virtual Machine Managers (VMMs), are the core of hardware virtualization. They
create and manage virtual environments where guest operating systems can run.
Types of Hypervisors
1. Dispatcher:
a. Acts as the entry point for the virtual machine.
b. Reroutes VM instructions to the appropriate module.
2. Allocator:
a. Manages and allocates system resources (CPU, memory, etc.) to VMs.
b. Adjusts resources dynamically as needed.
3. Interpreter:
a. Handles privileged instructions from the guest OS.
b. Triggers traps when such instructions are executed, ensuring proper emulation.
Requirements for Effective Virtualization (Simplified and Brief)
For a hypervisor to work effectively, it must meet three key criteria (based on Goldberg and Popek's 1974
principles):
1. Transparency: The guest OS should feel like it’s running on real hardware.
2. Efficiency: Most operations should run directly on the hardware, without hypervisor intervention.
3. Resource Control: The hypervisor must fully manage and control hardware resources assigned to
the guest OS.
Programming-Language-Level Virtualization
Application-Level Virtualization
• Abstracts applications from the OS, allowing them to run in isolated virtual containers.
• Key Benefits:
o Isolation: Prevents conflicts with other apps or the OS.
o Portability: Run apps on different systems without modification.
o Ease of Deployment: No traditional installation required.
• Examples: Wine (runs Windows apps on Linux), Docker (for containerized apps).
1. Storage Virtualization:
a. Combines multiple storage devices into a single logical storage system.
b. Example: Storage Area Networks (SANs).
2. Network Virtualization:
a. Abstracts physical networks to create virtual networks.
b. Types:
i. External: Combines physical networks into one logical network (e.g., VLANs).
ii. Internal: Provides virtual network functionality within a single system (e.g., virtual
NICs).
3. Desktop Virtualization:
a. Abstracts desktop environments, allowing remote access.
b. Examples: Citrix XenDesktop, VMware Horizon.
4. Application-Server Virtualization:
a. Combines multiple application servers into a single virtual server.
b. Benefits: Improves load balancing, high availability, and service quality.
Cons:
Containers
Containers are lightweight, portable, and isolated environments for running applications.
10 Key Points:
1. Isolation:
a. Applications in containers run independently from the host system and other containers.
b. Prevents conflicts and ensures security.
2. Portability:
a. Containers can run on any platform that supports container runtimes (e.g., Docker).
b. Write once, run anywhere.
3. Efficiency:
a. Containers share the host OS kernel, making them lightweight compared to virtual machines
(VMs).
b. Use fewer resources and start faster.
4. Consistency:
a. Containers ensure the application runs in the same environment across different systems.
b. Eliminates "it works on my machine" issues.
5. Fast Deployment:
a. Containers can be created, started, and stopped in seconds.
b. Enables rapid scaling and deployment of applications.
Container Orchestration
Container orchestration automates deployment, scaling, and management of containerized applications.
Benefits:
1. Standardization: Containers are now the standard for building and deploying apps, especially in
cloud architecture.
2. Efficiency: Simplifies packaging, deployment, and software management.
3. Centralized Management: Provides a single platform to manage software.
4. Consistency: Ensures standardized deployment across environments.
Orchestration Tools:
• Manage container lifecycles for high availability, load balancing, and fault tolerance.
• Examples: Kubernetes, Docker Swarm.
Key Functions:
What is Docker?
• Docker is a containerization platform that packages applications and their dependencies into
lightweight, portable containers.
• Containers are isolated, share the host OS kernel, and can run on any system with Docker installed.
Key Features:
Key Components:
• Client-Server Model:
o Docker Client: CLI tool to interact with Docker (e.g., docker run).
o Docker Daemon (dockerd): Manages containers, images, networks, and volumes.
• Communication: Client and daemon communicate via REST API.
What is Kubernetes?
Key Features:
Kubernetes Architecture:
1. Master Node:
Key Concepts:
Benefits of Kubernetes:
Key Features:
Key Components: