0% found this document useful (0 votes)
4 views

cc unit 2

The document provides a comprehensive overview of virtualization technology, its characteristics, types, and benefits, including cost savings, improved resource utilization, and enhanced disaster recovery. It also discusses containerization, specifically Docker and Kubernetes, highlighting their features, architecture, and advantages in managing applications. Additionally, Terraform is introduced as an Infrastructure as Code tool for defining and managing infrastructure efficiently.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

cc unit 2

The document provides a comprehensive overview of virtualization technology, its characteristics, types, and benefits, including cost savings, improved resource utilization, and enhanced disaster recovery. It also discusses containerization, specifically Docker and Kubernetes, highlighting their features, architecture, and advantages in managing applications. Additionally, Terraform is introduced as an Infrastructure as Code tool for defining and managing infrastructure efficiently.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

1.

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.

• Virtualization enables efficient resource utilization.


• It allows running multiple applications on a single server.
• Reduces hardware costs by consolidating servers.
• Improves disaster recovery and business continuity.
• Enables testing and development in isolated environments.
• Virtual machines (VMs) are independent of the underlying hardware.
• Supports legacy applications on modern hardware.
• Enhances scalability and flexibility in IT infrastructure.
• Reduces power consumption and cooling costs.
• Simplifies IT management and maintenance.

2. Characteristics of Virtualized Environments

Virtualized environments have specific features that make them unique and efficient.

10 Key Points:

• Isolation: Each VM operates independently.


• Encapsulation: VMs are packaged as single files for easy migration.
• Hardware Independence: VMs can run on any hardware.
• Resource Sharing: Multiple VMs share physical resources.
• Scalability: Resources can be allocated dynamically.
• Fault Tolerance: Failures in one VM do not affect others.
• Snapshotting: Ability to save and restore VM states.
• Portability: VMs can be moved between hosts easily.
• Security: VMs are isolated from each other.
• Cost Efficiency: Reduces the need for physical hardware
Characteristics of Virtualized Environments:

Increased Security:

Virtual machines (VMs) act as a protective layer between guest OS and host hardware.

Filters harmful actions and protects host resources.

Example: Running untrusted apps in a sandboxed Java Virtual Machine (JVM).

Managed Execution:

Sharing: Multiple VMs run on the same hardware, each isolated.

Aggregation: Combines multiple physical hosts into one virtual host.

Emulation: Simulates different hardware/OS environments (e.g., running Windows software on


Linux).

Isolation:

Each VM runs independently, preventing interference.

Protects the host from harmful guest actions.

Enables features like live VM migration for better efficiency.

Portability:

Virtual machines can be moved and run on different hosts.

Platforms like JVM allow apps to run on any OS without recompilation.

Example: Carry a VM on a USB and run it anywhere.


Taxonomy of Virtualization Techniques

Virtualization techniques are categorized based on what they virtualize and how they virtualize. Here's a
breakdown:

1. Based on Resource Type

• Hardware Virtualization: Virtualizes physical hardware (e.g., CPUs, memory).


o Examples: VMware, VirtualBox, KVM.
• Storage Virtualization: Combines multiple storage devices into one virtual storage.
o Examples: SANs (Storage Area Networks).
• Network Virtualization: Abstracts physical networks to create virtual networks.
o Examples: VLANs, SDN (Software-Defined Networking).

2. Based on Level of Virtualization

• Full Virtualization: Emulates entire hardware; guest OS runs unmodified.


o Example: VMware Workstation.
• Para-Virtualization: Guest OS is aware of virtualization and optimized for it.
o Example: Xen.
• OS-Level Virtualization: Runs isolated containers on a single OS kernel.
o Example: Docker, LXC.

3. Based on Technology

• Hypervisor-Based Virtualization: Uses a hypervisor to manage VMs.


o Type 1 (bare-metal): VMware ESXi.
o Type 2 (hosted): VirtualBox.
• Emulation: Simulates hardware entirely in software.
o Example: QEMU.
• Binary Translation: Translates guest instructions for compatibility.
o Example: VMware Player.

4. Based on Use Cases

• Application-Level Virtualization: Virtualizes specific apps.


o Example: Wine (runs Windows apps on Linux).
• Desktop Virtualization: Virtualizes desktop environments.
o Example: Citrix Virtual Apps.
• Server Virtualization: Divides physical servers into multiple virtual servers.
o Example: VMware vSphere.

5. Based on Execution Environment

• Programming-Level Virtualization: Abstracts runtime environments.


o Examples: JVM (Java Virtual Machine), .NET CLR.
• Process-Level Virtualization: Virtualizes individual processes.
o Example: Chroot.

Execution Virtualization

• Machine Reference Model: Defines layers for virtualization:


o Instruction Set Architecture (ISA): Hardware-level instructions.
o Application Binary Interface (ABI): Links OS and applications.
o Application Programming Interface (API): Links apps and libraries.

• Security and Privilege Levels:


o Ring 0: OS/hypervisor (most privileged).
o Ring 3: User applications (least privileged).
• Hypervisor Role: Manages VMs and enforces privileged execution.
Hardware-Level Virtualization

• Creates a virtual environment mimicking physical hardware.


• Key Components:
o Guest: OS running in the VM.
o Host: Physical hardware.
o Virtual Machine (VM): Emulated hardware environment.
o Hypervisor: Manages and abstracts hardware for VMs.

Hypervisors in Hardware Virtualization (Simplified and Brief)

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. Type I (Native/Bare-Metal Hypervisors):


a. Run directly on physical hardware (no host OS needed).
b. Interact with the hardware's Instruction Set Architecture (ISA).
c. Examples: VMware ESXi, Microsoft Hyper-V.
2. Type II (Hosted Hypervisors):
a. Run as applications on top of an existing host operating system.
b. Use the host OS's Application Binary Interface (ABI) to emulate hardware.
c. Examples: VMware Workstation, Oracle VirtualBox.

Key Components of a Hypervisor

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.

Operating System-Level Virtualization

• Creates isolated environments (containers) within a single OS kernel.


• Efficiency: Minimal overhead since containers share the same OS.
• Limitations: All containers must use the same OS, reducing flexibility.
• Examples: FreeBSD Jails, Solaris Zones, Docker.

Programming-Language-Level Virtualization

• Uses virtual machines to execute bytecode (a platform-independent binary format).


• Advantage: Provides a uniform execution environment across different platforms.
• Examples: Java Virtual Machine (JVM), .NET Framework.
• Use Case: Write once, run anywhere (e.g., Java programs can run on any OS with a JVM).

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).

Other Types of Virtualization

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.

Pros and Cons of Virtualization


Virtualization has advantages and disadvantages.
Pros:

1. Cost savings on hardware.


2. Improved resource utilization.
3. Enhanced disaster recovery.
4. Simplified IT management.
5. Increased scalability.
6. Better testing and development environments.
7. Reduced power and cooling costs.
8. Faster deployment of applications.
9. Improved security through isolation.
10. Flexibility in workload migration.

Cons:

1. High initial setup costs.


2. Requires skilled IT staff.
3. Performance overhead due to virtualization layer.
4. Security risks if the hypervisor is compromised.
5. Licensing costs for virtualization software.
6. Complexity in managing large virtualized environments.
7. Potential for resource contention.
8. Limited support for certain hardware.
9. Increased latency in some cases.
10. Dependency on the host machine.

Containers
Containers are lightweight, portable, and isolated environments for running applications.
10 Key Points:

1. Containers share the host OS kernel.


2. They are faster and lighter than VMs.
3. Docker is the most popular container platform.
4. Containers are portable across environments.
5. They use images to define the application environment.
6. Containers are ideal for microservices architecture.
7. They provide consistent environments for development and production.
8. Kubernetes is used to orchestrate containers.
9. Containers are isolated but not as secure as VMs.
10. They are widely used in DevOps and CI/CD pipelines.

Key Features of Containers (Simplified and Brief)

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.

Key Orchestration Tools

1. Kubernetes – Most widely used open-source orchestration tool.


2. Docker Swarm – Native clustering tool for Docker.
3. Amazon ECS – AWS's container orchestration service.
4. Google Kubernetes Engine (GKE) – Managed Kubernetes service.
5. Azure Kubernetes Service (AKS) – Microsoft Azure's Kubernetes solution.
Why Container Management? (Simplified and Brief)

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:

1. Scaling: Automatically add or remove containers based on demand.


2. Scheduling: Allocate resources (CPU, memory) and decide where containers run.
3. Networking: Enable communication between containers.
4. Monitoring: Track container health and performance.

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:

1. Portability: Run the same container on any machine with Docker.


2. Reproducibility: Ensures consistent environments across development, testing, and production.
3. Efficiency: Optimizes resource usage by running multiple containers on a single host.
4. Scalability: Easily scale applications to handle increased workloads.

Key Components:

1. Docker Engine: Core component that manages containers.


2. Docker Image: Read-only template for creating containers (contains app code and dependencies).
3. Docker Hub: Cloud repository for sharing and finding container images.
4. Dockerfile: Script with instructions to build a Docker image.
5. Docker Registry: Stores Docker images (public or private).
Docker Architecture:

• 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?

• Kubernetes is an open-source container orchestration tool.


• Automates deployment, scaling, and management of containerized applications.
Why Kubernetes?

• Manages containers across multiple hosts.


• Ensures high availability, scalability, and resilience.

Key Features:

1. Automated Scheduling: Places containers based on resource needs.


2. Self-Healing: Restarts failed containers.
3. Load Balancing: Distributes network traffic.
4. Scaling: Automatically scales apps based on demand.

Kubernetes Architecture:

1. Master Node:

a. API Server: Front-end for the control plane.


b. Scheduler: Assigns workloads to worker nodes.
c. Controller Manager: Manages controllers (e.g., node, replication).
d. etcd: Key-value store for cluster data.
e. Cloud Controller Manager: Manages cloud-specific resources.
2. Worker Node:
a. Kubelet: Ensures containers are running in pods.
b. Kube Proxy: Manages network rules.
c. Container Runtime: Runs containers (e.g., Docker, containerd).

Key Concepts:

1. Pod: Smallest deployable unit (contains one or more containers).


2. Service: Exposes pods to the network.
3. Deployment: Manages the desired state of pods (e.g., scaling, updates).

Benefits of Kubernetes:

• Portability: Runs on-premises, cloud, or hybrid.


• Scalability: Handles apps of any size.
• Efficiency: Optimizes resource usage.
• Community Support: Large open-source community.

Terraform (Simplified and Brief)


What is Terraform?

• Terraform is an Infrastructure as Code (IaC) tool.


• Allows you to define, provision, and manage infrastructure using code.

Key Features:

1. Infrastructure as Code: Define infrastructure in code files.


2. Cloud-Agnostic: Works with AWS, Azure, GCP, etc.
3. Declarative Approach: Describe desired state, Terraform handles the rest.
4. Execution Plan: Preview changes before applying.
5. Resource Management: Automates infrastructure provisioning.
How Terraform Works:

1. Write: Create .tf files to describe infrastructure.


2. Init: Run terraform init to initialize and download plugins.
3. Plan: Run terraform plan to preview changes.
4. Apply: Run terraform apply to create/update infrastructure.
5. Destroy: Run terraform destroy to remove infrastructure.

Key Components:

1. Terraform Core: Handles workflow (parsing, planning, applying).


2. Terraform Providers: Plugins for AWS, Azure, GCP, etc.
3. Configuration Files (.tf): Define infrastructure in HCL.
4. State File (terraform.tfstate): Tracks current infrastructure state.
5. CLI: Commands like init, plan, apply, destroy.

You might also like