Unit 2 Cloud
Unit 2 Cloud
Virtualization is the technology that allows you to create multiple simulated environments or dedicated
resources from a single, physical hardware system. It involves abstracting the physical hardware resources
(CPU, memory, storage, network) and presenting them as virtual resources to multiple virtual machines
(VMs) or other virtual entities.
Analogy: Imagine a large apartment building. The building itself is the single physical server. Each
apartment within the building is a virtual machine. While all apartments share the same physical building
infrastructure (electricity, plumbing, foundation), each apartment is isolated, has its own unique layout,
and can be rented out to different tenants who can furnish and use it independently. The building manager
(hypervisor) ensures each apartment gets its share of resources and remains separate.
Virtualization Reference Model
The virtualization reference model typically illustrates the layers involved in creating and managing virtual
environments. While there isn't one universally "standard" diagram, a common conceptual model includes:
1. Physical Hardware Layer: This is the bottom layer, consisting of the actual physical components like
CPU, RAM, hard drives, and network interfaces.
2. Hypervisor Layer (Virtual Machine Monitor - VMM): This is the crucial software layer that sits
directly on the physical hardware (Type 1) or on top of an existing operating system (Type 2). Its
primary role is to create and manage virtual machines, allocate physical resources to them, and
ensure their isolation.
3. Guest Operating System Layer: Each virtual machine runs its own independent operating system
(e.g., Windows, Linux), which is unaware that it's running on a virtualized environment rather than
directly on physical hardware.
4. Application Layer: Applications run within each guest operating system, just as they would on a
physical machine.
Conceptual Diagram of Virtualization Reference Model:
+------------------------------------------------------------------+
| APPLICATIONS |
+------------------------------------------------------------------+
| GUEST OPERATING SYSTEM (OS) |
+------------------------------------------------------------------+
| HYPERVISOR |
| (Virtual Machine Monitor - VMM) |
+------------------------------------------------------------------+
| PHYSICAL HARDWARE |
| (CPU, RAM, Storage, Network) |
+------------------------------------------------------------------+
This simplified diagram shows the typical layered architecture of a virtualized environment, from the
physical hardware up to the applications running within virtual machines.
Characteristics of a Virtualized Environment
A virtualized environment exhibits several key characteristics:
1. Partitioning:
o Explanation: The ability to divide a single physical server into multiple isolated virtual
machines. Each VM operates independently with its own operating system and applications.
o Technical Term: Isolation, Multi-tenancy (in cloud context).
o Example: A single physical server with 64GB RAM and 16 CPU cores can be partitioned into
four VMs, each with 16GB RAM and 4 CPU cores, running different applications.
2. Isolation:
o Explanation: Each virtual machine is isolated from other VMs running on the same physical
host. This means that issues in one VM (e.g., a crash or security breach) do not affect other
VMs.
o Technical Term: Fault Isolation, Security Isolation.
o Example: If VM A is idle, its unused CPU cycles can be temporarily allocated to VM B, which
is currently under heavy load.
2.2 Differentiate Various Types of Virtualization
Virtualization is not limited to just servers; it can be applied to various aspects of computing infrastructure.
1. Server Virtualization (Most Common)
Explanation: This is the process of partitioning a single physical server into multiple isolated virtual
servers (VMs), each running its own operating system. This is achieved by a hypervisor.
How it works: The hypervisor manages the physical hardware and allocates virtual CPU, memory,
storage, and network interfaces to each VM. Each VM believes it has dedicated hardware.
Analogy: Dividing a large house into several separate apartments, each with its own tenants and
utilities, but sharing the same foundation and roof.
Technical Terms: Hypervisor (Type 1/Bare-metal, Type 2/Hosted), Guest OS, Host OS, Virtual
Machine (VM).
Example: Running multiple Windows Server and Linux VMs on a single Dell PowerEdge physical
server using VMware ESXi or Microsoft Hyper-V.
2. Storage Virtualization
Explanation: This involves abstracting physical storage devices (e.g., hard drives from multiple
servers or storage arrays) into a single, logical pool of storage. This pool can then be allocated to
various servers or applications, regardless of the underlying physical location or type of storage.
How it works: Software creates a layer between the servers and the physical storage. It aggregates
storage capacity, manages data placement, and provides features like data replication, snapshots,
and thin provisioning.
Analogy: Instead of having separate cupboards in each room, you have one giant pantry that all
rooms can access, and the pantry manager (virtualization software) decides where each item is
physically stored.
Technical Terms: Storage Area Network (SAN), Network Attached Storage (NAS), Logical Unit
Number (LUN), Thin Provisioning, Data Deduplication.
Example: Combining storage from three different SAN arrays into one large virtual storage pool that
can be provisioned to various VMs as needed.
3. Network Virtualization
Explanation: This is the process of creating a software-defined, logical network that is decoupled
from the underlying physical network hardware. It allows network services (like switches, routers,
firewalls, load balancers) to be delivered as software, enabling dynamic configuration and
management.
How it works: A network virtualization layer (often part of a Software-Defined Networking - SDN
solution) creates virtual networks, virtual switches, and virtual routers. This allows network
administrators to provision and manage networks programmatically, independent of the physical
infrastructure.
Analogy: Instead of physically rewiring your house's internet cables every time you move a device,
you can simply drag and drop icons on a screen to connect devices to different virtual networks.
Example: Creating isolated virtual networks for different departments within a company on the
same physical network infrastructure, or dynamically provisioning a secure network segment for a
new application in a cloud environment.
4. Desktop Virtualization (Virtual Desktop Infrastructure - VDI)
Explanation: This involves hosting desktop environments (operating system, applications, and user
data) on a centralized server in a data center, rather than on individual user devices. Users access
their personalized virtual desktop remotely from any device.
How it works: A VDI solution creates and manages a pool of virtual desktops on server hardware.
When a user logs in, they are connected to a virtual desktop instance, which streams the desktop
interface to their client device.
Analogy: Instead of everyone having their own personal computer tower under their desk, all the
computer "brains" are in a central server room, and users just have a screen, keyboard, and mouse
to connect to their personalized desktop.
Technical Terms: Thin Client, Zero Client, Desktop as a Service (DaaS), Persistent/Non-persistent
Desktops.
Example: Employees accessing their Windows desktop and all their work applications from a tablet
at home, with all the processing happening in the corporate data center.
5. Application Virtualization
Explanation: This involves encapsulating an application from the underlying operating system on
which it runs. The application runs in its own isolated environment, preventing conflicts with other
applications or the OS.
How it works: The application is "packaged" with its own runtime environment, registry entries, and
files. When launched, it runs in a virtual bubble, making it independent of the local OS
configuration.
Analogy: Carrying a self-contained "appliance" (like a portable coffee maker) that works anywhere,
rather than needing to install a full kitchen (operating system) for each coffee maker.
Technical Terms: Application Streaming, Application Isolation, Containerization (though distinct, it
shares similar goals of isolation and portability).
Example: Running an older version of a software application on a modern operating system without
compatibility issues, or streaming a complex design application to multiple users without installing it
locally on each machine.
2.3 Technology Examples
2.3.1 VMware: Full Virtualization Reference Model
VMware is a pioneer and leading provider of virtualization software. Its primary approach is full
virtualization.
Full Virtualization (Type 1 Hypervisor Example):
o Explanation: In full virtualization, the hypervisor (e.g., VMware ESXi) directly interacts with
the physical hardware. It creates a complete simulation of the underlying hardware for each
virtual machine. The guest operating system runs unmodified, believing it has direct access
to the physical hardware.
o How it works: The hypervisor intercepts all hardware calls made by the guest OS and
translates them to the actual physical hardware. This translation process can introduce some
overhead.
o Reference Model (VMware ESXi):
1. Physical Hardware: The actual server components.
2. VMware ESXi (Hypervisor): Installed directly on the bare metal. It manages CPU,
memory, storage, and network resources.
3. VMkernel: A small operating system within ESXi that handles hardware access,
scheduling, and resource management.
4. Virtual Machines (VMs): Each VM runs an unmodified guest OS (e.g., Windows,
Linux) and its applications. ESXi provides each VM with virtual hardware (virtual CPU,
virtual RAM, virtual network adapter, virtual disk).
o Advantages:
Explanation: Guest operating systems are modified (or "ported") to be aware that
they are running in a virtualized environment. This allows the guest OS to
communicate directly with the hypervisor using special "hypercalls" instead of
requiring the hypervisor to translate every hardware instruction.
Advantages:
How it works: For HVM guests, Xen uses processor features to trap and emulate
privileged instructions, allowing the guest OS to run without modification. Device
emulation is often handled by QEMU, which runs within Dom0.
Guest Operating System Management in Xen:
o Dom0's Role: Dom0 is critical for managing DomU guests. It handles:
VM Creation and Deletion: Initiating and terminating guest VMs.
Resource Allocation: Assigning CPU, memory, and I/O resources to DomU guests.
Device Drivers: Providing access to physical devices (network cards, storage
controllers) to DomU guests through its own drivers.
Console Access: Providing a console for interacting with DomU guests.
Live Migration: Facilitating the movement of running VMs between physical hosts.
o Hypercalls: Guest OSes (in PV mode) make direct calls to the Xen hypervisor (hypercalls) for
privileged operations, bypassing the need for binary translation.
o PV Drivers: Even in HVM mode, installing Xen-specific PV drivers within the guest OS can
significantly improve performance for I/O operations by allowing the guest to communicate
more efficiently with Dom0 for device access.
2.4 Definition and Life Cycle of Virtual Machine (VM), VM Migration, and VM
Consolidation/Management
Definition and Life Cycle of Virtual Machine (VM)
Definition of Virtual Machine (VM): A Virtual Machine (VM) is a software-based, isolated, and self-
contained operating environment that emulates a complete computer system. It runs its own operating
system and applications, functioning as if it were a separate physical computer, but it shares the underlying
physical hardware resources of a host server.
Analogy: A VM is like a virtual computer within your computer. You can install a different operating system
on it, run software, and it won't interfere with your main computer's operations.
Life Cycle of a Virtual Machine (VM): The life cycle of a VM involves several stages, from creation to
termination:
1. Creation/Provisioning:
o Concept: A new VM is defined and configured based on specifications (CPU, RAM, storage,
network interfaces, OS image). The hypervisor allocates virtual resources and creates the
VM's configuration files and virtual disk files.
o Concept: The VM is powered on, and the guest OS boots up. Applications are installed and
run within the VM. The hypervisor continuously manages resource allocation and ensures
the VM's isolation and performance.
o Example: The VM is running, hosting a web server, and serving requests to users.
4. Suspension/Pause:
o Concept: The VM's current state (memory, CPU registers) is saved to disk, and the VM is
temporarily paused. It can be resumed later from the exact point it was suspended.
o Example: Suspending a development VM at the end of the workday to quickly resume work
the next morning without a full boot.
5. Migration:
o Concept: Moving a VM from one physical host server to another. This can be done while the
VM is running (live migration) or powered off (cold migration). (Detailed below)
6. Snapshot:
o Concept: A snapshot captures the state of a VM at a specific point in time, including its
memory, settings, and disk data. This allows users to revert the VM to a previous state if
needed.
o Example: Taking a snapshot before installing a risky software update, so you can revert if the
update causes issues.
7. Termination/Deletion:
o Concept: The VM is powered off and its associated files (virtual disk, configuration) are
permanently deleted from the storage. This frees up resources on the physical host.
o Example: Deleting a test VM after a project is completed to reclaim storage and compute
resources.
VM Migration: Concept and Techniques
VM Migration is the process of moving a virtual machine from one physical host server to another without
interrupting its operation or with minimal downtime.
Concept:
o Purpose: Load balancing, hardware maintenance/upgrades, disaster recovery, resource
optimization, avoiding host failures.
o Types:
Cold Migration: The VM is powered off before being moved. This is the simplest but
involves downtime.
Analogy: Moving a running train from one track to another. You build the new track
next to the old one, gradually shift the train's weight, and then quickly switch the last
bit over.
2. Post-copy Migration:
Combined Migration (e.g., VMware vMotion + Storage vMotion): Moving both the
compute (VM itself) and storage simultaneously to a new host and new storage.
VM Consolidation: Concepts
VM Consolidation is the process of reducing the number of physical servers by migrating multiple virtual
machines onto fewer, more powerful physical servers.
Concept: Instead of having many underutilized physical servers, virtualization allows you to run
multiple VMs on a single physical server, maximizing hardware utilization.
Benefits:
o Cost Savings: Reduces hardware costs (fewer servers to buy), power consumption, cooling
costs, and data center space.
o Simplified Management: Fewer physical servers to manage and maintain.
o Reduced Carbon Footprint: Lower energy consumption contributes to environmental
sustainability.
o Improved Resource Utilization: Maximizes the use of expensive server hardware.
Example: Replacing 10 physical servers, each running a single application at 10% CPU utilization,
with 2 powerful physical servers, each hosting 5 VMs, bringing CPU utilization to 50% per server.
VM Management: Concepts
VM Management refers to the tools, processes, and strategies used to provision, operate, monitor,
optimize, and secure virtual machines throughout their lifecycle.
Key Concepts:
1. Provisioning: Automating the creation and deployment of VMs based on templates or
predefined configurations.
2. Resource Allocation: Dynamically assigning CPU, memory, storage, and network bandwidth
to VMs based on demand and policies. This includes features like Dynamic Resource
Scheduling (DRS), which automatically balances VM workloads across hosts.
3. Monitoring: Tracking the performance and health of VMs and the underlying physical
infrastructure (CPU usage, memory consumption, network I/O, disk latency).
4. Patching and Updates: Managing software updates for guest operating systems and
applications within VMs.
5. Backup and Recovery: Implementing strategies to back up VM data and configurations, and
recover them in case of data loss or disaster.
6. Security: Implementing security policies, firewalls, intrusion detection, and access controls
for VMs and the virtualization layer.
7. Automation: Using scripting and orchestration tools to automate repetitive VM
management tasks.
8. Capacity Planning: Analyzing current and projected resource usage to ensure sufficient
physical infrastructure is available for future VM growth.
2.5 Advantages and Disadvantages of Virtualization
Advantages of Virtualization
1. Cost Savings:
o Reduced Hardware Costs: Fewer physical servers needed due to consolidation.
o Lower Power and Cooling Costs: Less hardware consumes less electricity and generates less
heat.
o Reduced Data Center Space: Consolidating workloads frees up valuable rack space.
o Simplified Management: Less physical hardware to maintain.
2. Increased Resource Utilization:
o Physical servers are often underutilized. Virtualization allows multiple workloads to share
the same hardware, significantly increasing the average utilization rate of CPU, memory, and
storage.
3. Improved Agility and Speed:
o Rapid Provisioning: VMs can be created and deployed much faster than provisioning
physical hardware (minutes vs. days/weeks).
o Faster Development Cycles: Developers can quickly spin up test and development
environments.
4. Enhanced Disaster Recovery and Business Continuity:
o Easy Backup and Restore: VMs can be easily backed up and restored.
o Live Migration: Allows for planned maintenance without downtime.
o High Availability: VMs can be automatically restarted on another host in case of a physical
server failure.
o Simplified Replication: Entire VMs can be replicated to a disaster recovery site.
5. Better Isolation and Security:
o Each VM is isolated from others, preventing "noisy neighbor" issues and containing security
breaches within a single VM.
6. Reduced Downtime:
o Features like live migration and automated failover minimize service interruptions during
hardware failures or planned maintenance.
7. Flexibility and Portability:
o VMs are hardware-independent, allowing them to be moved between different physical
servers or even different virtualization platforms (with some conversion).
8. Simplified Testing and Development:
o Developers can create isolated environments for testing new software or configurations
without affecting production systems. Snapshots allow easy rollback.
Disadvantages of Virtualization
1. Single Point of Failure (Host):
o If a physical host server fails, all VMs running on it will go down (though this is mitigated by
high availability features like automated failover and live migration).
2. Performance Overhead:
o While modern hypervisors are highly optimized, there is always some degree of
performance overhead due to the virtualization layer, especially for I/O-intensive workloads
(though often negligible for most applications).
3. Complexity of Management:
o Managing a large virtualized environment requires specialized skills and tools. While it
simplifies physical hardware management, it introduces new layers of software
management.
4. Licensing Costs:
o Hypervisor software itself often requires licenses, and operating system licenses for each VM
can add up, though many vendors offer virtualization-friendly licensing.
5. Resource Contention:
o If not properly managed, too many VMs on a single host can lead to resource contention
(e.g., CPU, memory, I/O bottlenecks), degrading performance for all VMs.
6. Initial Setup Costs (for on-premises):