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

Module 1_ Virtualization

The document provides an overview of virtualization, including its characteristics, implementation levels, and various types such as hardware, OS, storage, and network virtualization. It discusses the pros and cons of virtualization, including resource efficiency and cost savings, as well as challenges like performance overhead and security concerns. Additionally, it covers the architecture of Zen and KVM hypervisors and their applications in cloud computing and data centers.

Uploaded by

2023.gargi.dhuri
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)
9 views

Module 1_ Virtualization

The document provides an overview of virtualization, including its characteristics, implementation levels, and various types such as hardware, OS, storage, and network virtualization. It discusses the pros and cons of virtualization, including resource efficiency and cost savings, as well as challenges like performance overhead and security concerns. Additionally, it covers the architecture of Zen and KVM hypervisors and their applications in cloud computing and data centers.

Uploaded by

2023.gargi.dhuri
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/ 61

Virtualization

Module 1
contents
● Characteristics of the Virtualized Environment
● Structure of Virtualization
● Implementation levels of Virtualization Mechanisms
○ Storage, CPU, hardware and OS Virtualization,
● pros and cons of Virtualization
● Virtualization vs Cloud Computing
● Zen and KVM architecture.
● Definition: Virtualization is the process of creating a virtual version of
something, such as hardware, storage, or network resources.
● Purpose: To enhance resource utilization, scalability, and efficiency by
creating multiple isolated environments on a single physical system.
● Key Concept: "One physical resource can be divided into many virtual
instances."
Examples of Virtualization
Hardware Virtualization (Server Virtualization):

● Creating multiple virtual machines (VMs) on a single physical server.


● Virtualization at the hardware level, where the hypervisor manages the
hardware resources and allocates them to virtual machines.
● Example: CPU Virtualization (Intel VT-x, AMD-V), Memory and I/O
Virtualization.

Operating System Virtualization (Containerization):

● Virtualization within the OS where multiple isolated environments (containers)


run on a single OS kernel.
● Example: Docker, LXC (Linux Containers), OpenVZ.
Storage Virtualization:
● Aggregating multiple physical storage devices into a single, unified virtual
storage pool.
● Virtualization of storage resources, enabling easier management and
scalability of storage systems.
● Example: SAN (Storage Area Network) presenting virtualized storage.
Network Virtualization:
● Creating multiple virtual networks on top of a physical network.
● Virtualization of network resources, allowing the creation of virtual networks
that operate independently of the physical network.
● Example: Virtual LANs (VLANs), Software-Defined Networking (SDN),
Network Function Virtualization (NFV).
Application Virtualization:
● Running applications without installation on a local machine.
● Virtualization that focuses on isolating and running applications or services in
a controlled environment.
● Example: JVM, .NET, Wine (for running Windows apps on Linux).
Characteristics of Virtualization (Pros)
● Resource Efficiency: Maximize hardware utilization by running multiple
virtual instances on one physical machine.
● Cost Savings: Reduces the need for additional physical hardware, resulting
in cost savings on hardware and maintenance.
● Isolation: Failures in one virtual machine do not impact others, increasing
stability.
● Flexibility and Scalability: Easily move, clone, or scale virtual machines as
needed.
● Improved Disaster Recovery: Virtual machines can be backed up and
restored quickly, improving business continuity.
● Snapshots and Cloning: Virtual environments allow for snapshots
(point-in-time backups) and cloning (copying entire virtual machines), which is
useful for disaster recovery, testing, and rapid deployment.
● Management and Automation: Virtual environments are often managed
through centralized tools that allow for automation, monitoring, and
orchestration of virtual resources, making management more efficient.
● Portability : Virtual machines can be easily moved between different physical
hosts, enabling better disaster recovery, testing, and migration strategies.
Structure of Virtualization
1. Physical Hardware (Host Machine)
This is the underlying physical server or
system that provides resources such as
CPU, memory, and storage.
2. Hypervisor (Virtual Machine
Monitor)Software that manages virtual
machines.
● Type 1 Hypervisor (Bare-metal): Runs
directly on the physical hardware (e.g.,
VMware ESXi, Microsoft Hyper-V, Xen).
● Type 2 Hypervisor (Hosted): Runs on
top of a host operating system (e.g.,
VirtualBox, VMware Workstation).
3. Virtual Machines (VMs)
These are the isolated environments that run on top of the hypervisor, each
with its own operating system and applications.
4. Virtual Resources
The hypervisor manages virtual resources that are assigned to VMs, such as
virtual CPUs, memory, storage, and networking.
5. Virtualization Management Layer (Optional)
Management software or interfaces (e.g., vCenter, Hyper-V Manager) that
help manage the hypervisor and virtual machines.
6. Guest OS
The operating systems installed inside each virtual machine. These OSes can
vary depending on the user’s needs (e.g., Linux, Windows, etc.).
7. Virtual Network: A virtualized network layer that enables communication
between virtual machines.
Implementation of Virtualization
● Full virtualization
● Para-virtualization
● OS-level virtualization
● Full virtualization
○ Full virtualization uses a specific software called a hypervisor. The
hypervisor interacts straight with the physical server’s CPU and disk
space and serves as a virtual server’s operating systems program.
○ Hence, the hypervisor keeps each virtual server wholly independent and
unaware of the separate virtual servers working on the physical machine.
○ The hypervisor observes the physical server’s resources. As virtual
servers run applications, the hypervisor sends resources from the
physical machine to the relevant virtual server
● Para-virtualization
○ The para-virtualization program is a little different. Unlike the full
virtualization technique, the guest servers in a para-virtualization system
are aware of one another.
○ Therefore, a para-virtualization hypervisor doesn’t require as much
processing power to control the guest operating systems.
○ Each OS is already conscious of the demands the other operating
systems are setting on the physical server. The entire system works
collectively as a cohesive unit.
● OS-level virtualization
○ An OS-level virtualization program doesn’t use a hypervisor at all. Instead,
the virtualization ability is part of the host OS, which fulfills all the
functions of a fully virtualized hypervisor.
○ The most unusual limitation of this approach is that all the guest servers
must work on the same OS. Hence, each virtual server remains free from
all the others, but you can’t mix-match operating systems between them.
○ As all the guest operating systems must be the same, this is called a
homogeneous environment.
Implementation levels of Virtualization
● Instruction Set Architecture Level (ISA)
● Hardware Abstraction Level (HAL)
● Operating System Level
● Library Level
● Application Level
● Instruction Set Architecture (ISA) Level Virtualization
○ Virtualization through ISA emulation enables running legacy code on
different hardware.
○ Helps in making hardware-agnostic virtual machines.
○ Supports running binary code on x86 and x64 machines with minor
tweaks.
○ Requires an interpreter to convert source code into a hardware-readable
format.
○ Example: QEMU is a widely used ISA-level virtualization tool that
emulates different CPU architectures. It allows running legacy or
cross-platform applications on various hardware.
■ QEMU can run software designed for ARM, PowerPC, or MIPS on
x86 or x64 machines.
○ Use Cases:
■ Running older operating systems (e.g., Windows XP, DOS) on
modern computers.
■ Testing and debugging software for different CPU architectures.
■ Running embedded system applications on development machines.
● Hardware Abstraction Level (HAL)
○ Virtualization performed at the hardware level using a bare hypervisor.
○ Manages hardware components like I/O devices, processors, memory, etc.
○ It creates multiple virtual instances, allowing different OSes to run on the
same hardware.
○ First implemented by IBM VM/370 (1960), now used in Xen hypervisors for
Linux and other OS.
■ Xen runs directly on the hardware (Type-1 hypervisor) and abstracts
the underlying physical resources (CPU, memory, I/O).
○ Suitable for cloud-based infrastructure.
■ Xen is widely used in Amazon AWS, Citrix XenServer, and Oracle VM
for cloud-based infrastructure.
○ Use Cases:
■ Running multiple operating systems (Linux, Windows) on the same
machine with minimal overhead.
■ Creating isolated virtual environments for cloud computing.
■ Efficient resource utilization in data centers.
● Operating System Level
○ Creates an abstract layer between applications and OS.
○ Uses isolated containers on a physical server and OS.
○ Each container functions like a separate server.
○ Ideal for scenarios with multiple users needing dedicated virtual
environments.
○ Prevents resource conflicts among users.
○ Docker is a widely used operating system-level virtualization tool that
creates lightweight, isolated containers to run applications.
■ Containerization: Docker creates containers that share the host
OS kernel but have isolated user spaces.
■ No Need for Full VM: Unlike traditional VMs, Docker does not
require a separate OS for each instance, reducing overhead.
■ Portability: Applications inside Docker containers can run on any
system with Docker installed, making deployment seamless.
○ Use Cases:
■ Cloud Applications: Used by Google Cloud, AWS, and Azure for
scalable app deployment.
■ Development & Testing: Developers use Docker to ensure software
runs the same way across different environments.
● LIBRARY LEVEL VIRTUALIZATION
○ Here virtualization is achieved through a software library, rather than
relying on hypervisors or container runtimes. This approach allows the
user or application to directly interact with virtualized resources without
the overhead typically associated with hypervisor-based virtualization.
○ In library-level virtualization, a specialized library or API (Application
Programming Interface) is used to manage virtual environments. This can
be a simpler and more lightweight approach compared to traditional
hardware or OS-level virtualization.
○ Examples : WINE is a popular library-level virtualization tool that allows
Windows applications to run on Linaux without requiring a full Windows
OS.
■ API Hooking: Instead of translating entire system calls, WINE
implements Windows API calls on Linux.
■ No Full OS Virtualization: Unlike VMs, it does not require installing
Windows OS, making it more efficient.
○ Use Cases:
■ Running Windows games and software (e.g., Microsoft Office,
Notepad++) on Linux.
■ Enabling cross-platform compatibility for Windows-exclusive
applications.
● Application Virtualization
○ Virtualizes only a single application, not the entire platform.
○ Also known as process-level virtualization.
○ Useful for running virtual machines with high-level languages.
○ The application sits above the virtualization layer, which is above the OS.
○ Ensures smooth execution of compiled programs in high-level language
○ Example : Java Virtual Machine (JVM)
■ The Java Virtual Machine (JVM) is a classic example of
application-level virtualization, enabling Java applications to run on
different operating systems without modification.
■ Virtual Machine for Java Programs: JVM acts as an intermediary
between Java programs and the underlying OS.
Mechanisms of Virtualization
Hypervisor
● The hypervisor is a layer of software that resides below the virtual machines
and above the hardware
● The hypervisor manages the interactions between each virtual machine and
the hardware that the guests all share
● It is possible to build hypervisor capabilities either directly above the
hardware, or interface with an Operating System managing the hardware
● Type 1 hypervisors (also referred to as a bare-metal implementation) run
directly on the server hardware without an operating system beneath it
○ Type 1 hypervisors can only support guest operating systems with a compatible kernel
● A Type 2 hypervisor (also known as a hosted hypervisor implementation) itself
is an application that runs atop a traditional operating system, and
intermediates interaction between the guest and the host operating system
○ Type 2 hypervisors can support a wide range of guest operating systems
since there is a software layer that sits between the guest and the host
● A Type 1 hypervisor can directly communicate with the hardware resources in
the stack below it, making it much more efficient than the Type 2 hypervisor
● Type 1 hypervisors are also considered to be more secure than Type 2
hypervisors
○ This is because the guest operations are passed through to the hardware, and, as such, a
mischievous guest cannot affect the hypervisor on which it is supported
● Type 2 hypervisors are usually easy to install and deploy because much of
the hardware configuration work, such as networking and storage, has
already been covered by the operating system
Real-World Applications of Virtualization
Data Centers: Virtualization reduces hardware costs and energy consumption.

Software Testing and Development: Virtual machines can simulate different


environments for testing and development.

Cloud Hosting: Virtualization is essential for cloud providers to offer scalable and
flexible hosting solutions.

Disaster Recovery: Virtual machines can be backed up and restored quickly in


case of failure.
Advances in Containerization: As containers become more popular, the focus is
shifting toward lightweight, fast virtualization (e.g., Docker and Kubernetes).

Integration with AI and Automation: Virtualization technologies will integrate


more with artificial intelligence and automation tools for smarter resource
management.

Serverless Computing: A shift towards serverless architectures that further


abstract physical resources.
Challenges and Considerations ( Cons)
● Performance Overhead:

Virtual machines introduce a small amount of overhead compared to running


directly on physical hardware.

Running multiple VMs on a single physical machine introduces some overhead


due to the virtualization layer. This can lead to reduced performance compared to
running software directly on physical hardware

● Security:

Virtual environments need robust security mechanisms to prevent vulnerabilities


from affecting the host system or other VMs.
● Resource Allocation:

Ensuring fair and efficient resource allocation between virtual machines is critical

If not properly managed, multiple virtual machines or containers running on the


same physical hardware can lead to resource contention (CPU, memory, I/O.

● Initial Setup Costs:

While virtualization can save costs in the long run, setting up a virtualized
environment requires significant upfront investment in software, hypervisors, and
hardware capable of supporting virtualization
● Single Point of Failure:

If the underlying physical server or hypervisor fails, all the VMs running on
that server are impacted.

● Hardware Dependency:

Virtualization often requires specialized hardware (e.g., processors with


virtualization support) to operate efficiently.

● Complex Management

Virtualization environments can become complex to manage, especially in


large-scale deployments. Requires specialized tools and skills to effectively
monitor, manage, and optimize virtualized resources.
Zen Architecture
● Open-source Type-1 hypervisor (bare-metal).
● Developed at the University of Cambridge, now under the Linux Foundation.
● Enables virtualization by allowing multiple OS to run on the same hardware.
● Paravirtualization & Hardware Virtualization – Optimizes guest OS
performance.
● Live Migration – Move VMs across servers with zero downtime.
● Security & Isolation – Microkernel design with minimal attack surface.
● Scalability – Manages multiple virtual machines efficiently.
● Xen remains a strong choice for cloud and virtualization.
● Competes with KVM, VMware, and Hyper-V in enterprise solutions.
● Xen in Cloud Computing
○ Amazon Web Services (AWS) – Previously relied on Xen for EC2
instances.
○ Oracle Cloud, IBM Cloud – Use Xen for secure virtualization.
○ XCP-ng & Citrix Hypervisor – Built on Xen for enterprise-grade
virtualization.
● Use Cases of Xen
○ Cloud Computing Platforms – Multi-tenant hosting.
○ Enterprise IT Virtualization – Running multiple OS on a single server.
○ Embedded & Security Systems – Used in automotive and IoT
applications.
KVM Architecture
The idea of “a cloud”
● Cloud computing is not a recent concept
○ The idea of time sharing systems in the 1960s can be considered as the initial point
● The term “cloud” itself depicts a model to support distributed computing
● The Data centres were generally grossly underused
● Businesses wanted a way out to tap the unused resources
● virtualization can help here
○ Loads distributed over several, underused physical servers can be
consolidated over virtual servers running on the same physical server
○ The overall resource utilization goes up, and excluding peculiar situations
where peak load windows of the VMs coincide or overlap, the model
works fairly well
● The National Institute of Standards and Technology (NIST), United States,
define five characteristics of a cloud offering
○ Broad Network Access
■ The services deployed on a cloud are available over a network, and
are accessed via the broad range of Network Protocols such as
HTTP, HTTPS, SSH etc.
○ Resource Pooling
■ On a Cloud Platform, resources such as storage units and
computation units are pooled by the Cloud Provider, which can then
be used to serve multiple Cloud applications at the same time
○ On-demand Self-Service
■ Consumers can provision computing capabilities without human
interaction
○ Measured Service
■ Usage of resources can be monitored, controlled, and reported
■ Provides transparency for both the provider and consumer
○ Rapid elasticity
■ Computing capabilities can be rapidly and elastically provisioned to
quickly scale up and rapidly released to scale down
■ To the consumer, the capabilities available for provisioning often
appear to be unlimited
Virtualization in Cloud Computing
Virtualization is a key enabler of cloud computing, allowing resources (storage,
processing, and networking) to be provided as services.

Benefits in cloud:

● On-demand provisioning: Quickly provision and scale virtualized resources.


● Resource pooling: Aggregate resources from multiple physical servers into a
cloud infrastructure.
Taxonomy of cloud environments
● Based on their deployment and the offered services, cloud environments can
be classified into different categories
● Classification on the basis of offered services:
○ Infrastructure as a Service
○ Platform as a Service
○ Software as a Service
● Classification on the basis of deployment:
○ Public Cloud
○ Private Cloud
○ Hybrid Cloud
Infrastructure as a Service
● IaaS provides fundamental computing resources as the offered service for
usage
● IaaS provides users with virtualized computing resources over the internet. It’s
like renting the basic building blocks of IT infrastructure—servers, storage,
networking, and operating systems—without having to buy or manage
physical hardware.
● In simpler terms, an IaaS provider would provide offerings at a core level, such
as a Virtual Machine, a Storage Array and a (per-project) Firewalled Network
● The user is solely responsible for even basic tasks such as installing an
operating system on the VMs, defining networks and subnets, and applying
patches or updates to any deployed applications
○ Provides maximum control to the user, but requires maximum efforts to maintain
● Eg:
○ You rent virtual servers from an IaaS provider like AWS EC2, Microsoft
Azure, or Google Cloud Platform to host your website
○ Amazon S3 (Simple Storage Service), Azure Blob Storage, Google Cloud
Storage are virtualized storage that can be used to store and manage
data
○ AWS VPC (Virtual Private Cloud), Azure Virtual Network (VNet), Google
Virtual Private Cloud (VPC) to created firewalled network
Platform as a Service
● PaaS offerings provide support for programming environments, development or
deployment stacks, APIs etc.
● Provides a ready-to-use platform where developers can build, test, and deploy
applications. It eliminates the need to manage the underlying hardware, servers,
or software infrastructure, allowing you to focus only on your code and
applications.
● How PaaS works
○ User Responsibilities:
■ Write and deploy code.
■ Configure application-specific settings (e.g., custom JARs or URL).
○ Provider Responsibilities:
■ Maintain servers, OS, and middleware.
■ Manage security, updates, and scalability.
● Eg: You use a service like Google App Engine, AWS Elastic Beanstalk, or
Microsoft Azure App Service, which already provides:
○ A server to host your app.
○ A programming environment (e.g., Python, Node.js, Java).
○ Database and scaling features pre-configured.
● You just upload your app’s code, and the platform takes care of deployment
and scaling automatically.
Software as a Service
● SaaS offerings provide an already ready to use service or product, with
possible user specific customizations
● Typically no programming is involved and/or allowed in SaaS offerings
● A website with the option to choose custom themes, banners, logos etc. could
be considered a SaaS example
● The user has no control or knowledge of the underlying infrastructure
● The user can make tweaks, usually via a GUI, to his/her own preferences, but
cannot alter any fundamental behaviour of the application
● Usually suitable for those cases where user needs are fairly standard, and a
little customization makes the services acceptable to a wide range of
customers
● Provides very little control, hence minimal manual intervention is needed to
● Example:
○ Gmail – A cloud-based email service that allows users to send, receive,
and manage emails online without installing any software.
○ Microsoft 365 – An online office suite that includes applications like Word,
Excel, and PowerPoint, accessible via a web browser.
○ Netflix – A streaming platform that provides on-demand access to movies
and TV shows without requiring downloads.
○ Salesforce – A cloud-based Customer Relationship Management (CRM)
tool that helps businesses manage customer interactions, sales, and
marketing.
Public Cloud
● Definition: Cloud services provided by third-party vendors and made available to
the public over the internet.
● Examples: AWS (Amazon Web Services), Microsoft Azure, Google Cloud.
● Cost: Pay-as-you-go model, generally more cost-effective for small businesses
and startups.
● Accessibility: Available to anyone with an internet connection; highly scalable.
● Security: Shared resources, meaning potential risks from other users on the
same infrastructure. Security measures are handled by the service provider.
● Management: Managed by the cloud service provider.
● Use Case: Ideal for businesses with fluctuating demands or those seeking
scalable resources without the need for heavy infrastructure investment.
● Examples of Usage: Hosting websites, running applications, storage, and
data backup.
Private Cloud
● Definition: Cloud infrastructure dedicated to a single organization, either hosted
on-premises or by a third-party provider.
● Examples: VMware Private Cloud, Microsoft Azure Stack.
● Cost: Generally higher upfront costs due to the need for dedicated infrastructure,
but offers more control.
● Accessibility: Restricted to a single organization; provides more control over
resources and security.
● Security: Enhanced security due to dedicated infrastructure and control over
data handling.
● Management: Can be managed either internally or by a third-party provider.
● Use Case: Suitable for organizations with strict regulatory requirements or
specific security needs.
● Examples of Usage: Sensitive data storage, high-performance computing,
and private applications.
Hybrid Cloud
● Definition: Combines elements of both public and private clouds, allowing
data and applications to be shared between them.
● Examples: AWS Outposts, Microsoft Azure Stack, Google Anthos.
● Cost: Offers a balance between cost efficiency and control, with the ability to
choose where resources are deployed.
● Accessibility: Provides flexibility, enabling on-premises and cloud resources
to work together.
● Security: Allows businesses to store sensitive data on private clouds while
utilizing public clouds for less-sensitive operations.
● Management: Requires careful management of both public and private cloud
resources.
● Use Case: Ideal for organizations needing to scale workloads flexibly while
keeping critical systems secure.
● Examples of Usage: Disaster recovery, balancing workload between public
and private clouds.
Virtualization vs Cloud Computing
References
1. David Marshall, Wade A. Reynolds, Advanced Server Virtualization: VMware
and Microsoft Platform in the Virtual Data Center, Auerbach
2. Publications, 2006. Cloud Computing (Principles and Paradigms), Edited by
Rajkumar Buyya, James Broberg, Andrzej Goscinski, John Wiley & Sons, Inc.
2011
3. Cloud computing a practical approach - Anthony T.Velte , Toby J. Velte Robert
Elsenpeter,TATA McGraw- Hill , New Delhi – 2010
4. Russ McKendrick, Learn Ansible, Pakt Publication
5. Learning Chef: A Guide to Configuration Management and Automation by
Mischa Taylor and Seth Vargo
6.

You might also like