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

UNIT II virtualization

This document covers the fundamentals of virtualization, including the definition and types of virtual machines, the role of hypervisors, and the structure of virtualization. It details various virtualization implementations such as full virtualization, para-virtualization, and operating system-level virtualization, along with their characteristics and use cases. The document emphasizes the benefits of virtualization in resource allocation, isolation, and flexibility in cloud computing environments.
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)
37 views

UNIT II virtualization

This document covers the fundamentals of virtualization, including the definition and types of virtual machines, the role of hypervisors, and the structure of virtualization. It details various virtualization implementations such as full virtualization, para-virtualization, and operating system-level virtualization, along with their characteristics and use cases. The document emphasizes the benefits of virtualization in resource allocation, isolation, and flexibility in cloud computing environments.
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/ 17

UNIT 2

VIRTUALIZATION BASICS

Virtual Machine Basics – Taxonomy of Virtual Machines – Hypervisor – Key Concepts –


Virtualization structure – Implementation levels of virtualization – Virtualization Types: Full
Virtualization – Para Virtualization – Hardware Virtualization – Virtualization of CPU, Memory
and I/O devices.

Virtual Machine Basics:

Virtual machines (VMs) are an essential component of cloud computing and virtualization
technology. Here are the basics of virtual machines:

1. Definition: A virtual machine is a software emulation of a physical computer system.


It allows multiple operating systems (OS) or applications to run on a single physical
machine, known as the host machine.

2. Hypervisor: The hypervisor, also called a virtual machine monitor (VMM), is a software
or firmware layer that enables the creation, management, and execution of virtual
machines. It abstracts the underlying physical hardware and allocates computing
resources to each virtual machine.

3. Guest OS: Each virtual machine runs its own guest operating system, which can be
different from the host operating system. This enables running multiple operating
systems concurrently on the same physical machine.

4. Resource Allocation: Virtual machines have dedicated virtualized resources allocated


to them, including CPU (processing power), memory (RAM), storage (disk space), and
network interfaces. These resources are isolated from each other, ensuring that the
performance of one virtual machine does not impact others.

5. Isolation: Virtual machines are isolated from one another, providing a level of security
and fault tolerance. If one virtual machine crashes or experiences issues, it does not
affect the operation of other virtual machines on the same host.

6. Live Migration: Virtual machines can be dynamically migrated from one physical host
to another without service interruption. This allows for load balancing, maintenance
activities, and improved resource utilization in the cloud environment.

7. Snapshots: Virtual machine snapshots enable capturing the state of a virtual machine
at a specific point in time. Snapshots can be used for backup, disaster recovery, or
testing purposes. They allow reverting a virtual machine to a previous state if needed.
8. Management: Virtual machines are typically managed through a centralized
management interface or tool, which provides features for provisioning, monitoring,
configuring, and controlling the virtual machines and their resources.

9. Application Deployment: Virtual machines offer a flexible platform for deploying and
running applications. Each virtual machine can have its own set of applications,
services, and configurations, providing isolation and simplifying application
deployment and management.

10. Compatibility: Virtual machines are designed to be compatible with standard x86 or
x64 hardware architecture. This allows running virtual machines on a wide range of
physical servers and platforms.

Virtual machines have revolutionized the way computing resources are utilized,
allowing for efficient resource allocation, better hardware utilization, and cost savings. They
have become a fundamental building block in cloud computing, enabling the rapid
deployment and scaling of applications and services in a flexible and scalable manner.

Taxonomy of Virtual Machines

A taxonomy of virtual machines categorizes them based on different characteristics and use
cases. Here's a taxonomy of virtual machines:

1. System Virtual Machines:

 System virtual machines provide a complete virtualized computing


environment that emulates a physical machine. They allow multiple operating
systems to run simultaneously on the same host hardware.
 Examples: VMware ESXi, Microsoft Hyper-V, Oracle VM VirtualBox.

2. Process Virtual Machines:

 Process virtual machines run individual processes or applications within an


operating system environment. They are designed to provide an isolated
execution environment for specific applications.

 Examples: Java Virtual Machine (JVM), Common Language Runtime (CLR) for
.NET.

3. Application Virtual Machines:

 Application virtual machines are designed to execute a specific application or


software stack independently of the underlying operating system. They
package the application along with the necessary runtime and libraries,
creating a self-contained environment.

 Examples: Java Virtual Machine (JVM) for running Java applications, Adobe
Flash Player.

4. Network Virtual Machines:

 Network virtual machines (NVMe) are virtual machines specifically designed


for network function virtualization (NFV) and software-defined networking
(SDN) environments. They run network services and functions as virtualized
instances, providing network functionality and services.

 Examples: Cisco Cloud Services Router (CSR), Juniper Networks vMX Virtual
Router.

5. Desktop Virtual Machines:

 Desktop virtual machines are virtualized desktop environments that provide a


complete operating system and user interface, allowing users to run multiple
desktop instances on a single physical machine.

 Examples: VMware Workstation, Oracle VM VirtualBox, Microsoft Hyper-V.

6. Container Virtual Machines:

 Container virtual machines, also known as lightweight virtualization or


operating system-level virtualization, provide isolated and lightweight
execution environments for applications. Containers share the host operating
system kernel, enabling efficient resource utilization and faster startup times
compared to traditional virtual machines.

 Examples: Docker, Kubernetes.


7. Cloud Virtual Machines:

 Cloud virtual machines are virtual machines specifically designed and


optimized for cloud computing environments. They provide scalable compute
resources on-demand and can be easily provisioned and managed through
cloud service providers' interfaces.

 Examples: Amazon EC2, Microsoft Azure Virtual Machines, Google Compute


Engine.

This taxonomy highlights the various types of virtual machines based on their purpose,
execution environment, and use cases. Each type serves specific requirements and offers
different benefits, allowing users to choose the most appropriate virtual machine based on
their needs.

Hypervisor – Key Concepts

A hypervisor, also known as a virtual machine monitor (VMM), is a software or


firmware layer that enables the creation, management, and execution of virtual machines
(VMs). It abstracts the underlying physical hardware and allows multiple operating systems
(OS) or applications to run concurrently on a single physical machine. Here are the key
concepts and the virtualization structure associated with a hypervisor:
1. Type 1 Hypervisor (Bare Metal Hypervisor):

 A type 1 hypervisor runs directly on the host machine's hardware without the
need for a separate operating system. It provides a layer of abstraction
between the hardware and the virtual machines.

 Virtual machines are created and managed directly on the hypervisor, which
has direct control over the hardware resources.

 Examples: VMware ESXi, Microsoft Hyper-V, KVM (Kernel-based Virtual


Machine).

2. Type 2 Hypervisor (Hosted Hypervisor):

 A type 2 hypervisor runs as a software layer on top of a host operating system.

 The host operating system provides basic services and device drivers, while the
hypervisor runs as an application within the host OS.

 Virtual machines are created and managed by the hypervisor, which relies on
the host OS for hardware access.

 Examples: VMware Workstation, Oracle VM VirtualBox, Microsoft Virtual PC.

3. Hardware Abstraction:

 The hypervisor abstracts the underlying physical hardware, such as the CPU,
memory, storage, and network interfaces, into virtual resources that can be
allocated to virtual machines.

 Each virtual machine perceives its allocated resources as dedicated and


isolated, even though they are shared with other virtual machines and
managed by the hypervisor.

4. Resource Allocation and Scheduling:

 The hypervisor manages the allocation and scheduling of physical resources


among virtual machines.

 It ensures fair sharing of resources, prevents resource conflicts, and optimizes


resource utilization based on the configured allocation policies and priorities.

5. Virtual Machine Creation and Management:

 The hypervisor facilitates the creation, deployment, and management of


virtual machines.

 It provides tools or interfaces for creating virtual machines, specifying their


configurations (e.g., CPU, memory, disk), and managing their lifecycle (start,
stop, pause, migrate, delete).
6. Virtual Machine Isolation:

 The hypervisor ensures that each virtual machine operates in isolation from
others, providing a dedicated and secure execution environment.

 Virtual machines are isolated in terms of memory, CPU, network, and disk
access, preventing interference and ensuring the stability and security of each
virtual machine.

7. Device Emulation and Virtual Device Drivers:

 The hypervisor emulates virtual devices that are presented to the virtual
machines, such as virtual CPUs, virtual memory, virtual network adapters, and
virtual storage devices.

 Virtual device drivers within the guest operating systems interact with these
virtual devices, enabling communication and access to the underlying physical
hardware through the hypervisor.

8. Live Migration and High Availability:

 Some hypervisors support live migration, which allows virtual machines to be


moved from one physical host to another without service interruption.

 Live migration enables load balancing, resource consolidation, and


maintenance activities while maintaining the availability of virtual machines.

Virtualization structure

The virtualization structure provided by the hypervisor allows for efficient utilization
of hardware resources, consolidation of workloads, isolation, and flexibility in managing
virtual machines. It forms the foundation of virtualization technologies and plays a crucial role
in modern data centers, cloud computing, and virtualized infrastructure environments.
Basic Structure of Virtualization

The virtualization structure refers to the architecture or framework used to implement


virtualization in a computing environment. It defines the components, relationships, and
interactions between the various elements involved in virtualization. Here are the key
components of a typical virtualization structure:

1. Host Machine (Physical Machine):

 The host machine is the physical hardware on which virtualization is


implemented.

 It consists of the CPU, memory, storage, network interfaces, and other


hardware components.

 The host machine runs the hypervisor or virtualization software that manages
and controls the virtualized environment.

2. Hypervisor (Virtual Machine Monitor):

 The hypervisor is a software layer that enables the creation, management, and
execution of virtual machines.

 It abstracts the underlying hardware and provides a platform for running


multiple virtual machines on a single host machine.

 The hypervisor manages the allocation of hardware resources, enforces


isolation between virtual machines, and facilitates communication between
virtual machines and the host hardware.

3. Virtual Machines (Guest Machines):

 Virtual machines are independent instances that emulate complete computer


systems.

 Each virtual machine runs its own operating system and applications as if it
were running on a physical machine.

 Virtual machines are created, managed, and executed by the hypervisor.

 They have dedicated virtualized resources, such as virtual CPUs, memory,


storage, and network interfaces, allocated to them.

4. Guest Operating Systems:

 Each virtual machine runs its own guest operating system, which can be
different from the host operating system.

 The guest operating system interacts with the hypervisor to manage hardware
resources within the virtual machine.
5. Virtual Device Emulation:

 The hypervisor provides virtualized devices to the virtual machines, emulating


hardware components such as CPUs, memory, storage, and network
interfaces.

 Virtual device emulation allows virtual machines to interact with the


virtualized hardware resources and abstracts them from the underlying
physical hardware.

6. Management Tools and Interfaces:

 Virtualization management tools and interfaces provide the means to


configure, provision, monitor, and manage virtual machines and the
virtualization environment.

 These tools enable administrators to allocate resources, monitor performance,


migrate virtual machines, and perform other administrative tasks.

7. Networking and Storage Infrastructure:

 The virtualization structure relies on the underlying networking and storage


infrastructure to provide connectivity and storage resources to the virtual
machines.

 Networking infrastructure facilitates communication between virtual


machines, between virtual machines and external networks, and between
virtual machines and the host machine.

 Storage infrastructure provides virtualized storage resources to virtual


machines, allowing them to store and access data.

The virtualization structure forms the foundation of a virtualized environment,


enabling the consolidation of workloads, efficient resource utilization, isolation, flexibility,
and scalability. It provides a framework for creating and managing virtual machines,
abstracting the hardware, and facilitating the execution of multiple operating systems and
applications on a single physical machine.

Implementation levels of virtualization

Virtualization can be implemented at different levels within a computing system, offering


varying degrees of isolation and flexibility. Here are the common levels of virtualization
implementation:
1. Full Virtualization:

 Full virtualization, also known as native virtualization, provides the highest


level of isolation and flexibility.

 In this approach, a complete virtual machine is created, which emulates the


underlying hardware, including the CPU, memory, storage, and peripheral
devices.

 Multiple guest operating systems can run simultaneously on the same physical
machine, each unaware that it is running within a virtualized environment.

 Examples: VMware ESXi, Microsoft Hyper-V.

2. Para-virtualization:

 Para-virtualization is a technique where the guest operating system is modified


to be aware of the virtualization layer.

 The modified operating system interacts directly with the hypervisor,


bypassing the need for full hardware emulation.

 Para-virtualization provides improved performance compared to full


virtualization but requires modifications to the guest operating system.

 Examples: Xen, Oracle VM Server.

3. Operating System-level Virtualization:


 Operating system-level virtualization, also known as containerization or
container-based virtualization, operates at the operating system level.

 It allows for the creation of multiple isolated user-space instances, known as


containers or virtual environments, within a single host operating system.

 Containers share the same kernel and underlying OS libraries, but each
container has its own isolated runtime environment.

 Operating system-level virtualization offers lightweight and efficient resource


utilization, with minimal overhead compared to full virtualization.

 Examples: Docker, LXC (Linux Containers).

4. Hardware-assisted Virtualization:

 Hardware-assisted virtualization utilizes specific CPU features and extensions


to enhance virtualization capabilities.

 These features, such as Intel VT-x (Virtualization Technology) and AMD-V (AMD
Virtualization), provide hardware support for virtualization, improving
performance and security.

 Hardware-assisted virtualization enables better execution of virtual machine


instructions, memory management, and device access.

 Most modern processors include hardware-assisted virtualization support.

5. Application-level Virtualization:

 Application-level virtualization, also known as application virtualization or


application streaming, isolates individual applications from the underlying
operating system.

 Instead of virtualizing the entire operating system, specific applications are


encapsulated along with their dependencies and run in an isolated
environment.

 Application-level virtualization simplifies application deployment,


management, and compatibility across different operating systems.

 Examples: Citrix XenApp, Microsoft App-V.

Each level of virtualization implementation offers different benefits and trade-offs in


terms of performance, flexibility, isolation, and management complexity. The choice of
virtualization level depends on the specific requirements of the workload, the desired level of
isolation, and the available infrastructure.
Full Virtualization

Full virtualization is a type of virtualization that allows for the complete emulation of
a physical computer system, including the underlying hardware. In full virtualization, a
hypervisor creates virtual machines (VMs) that behave like independent, self-contained
systems with their own operating systems and applications. Here are the key characteristics
and features of full virtualization:

1. Hardware Emulation: In full virtualization, the hypervisor provides a layer of software


that emulates the underlying hardware components, including the CPU, memory,
storage devices, and network interfaces. This allows the virtual machine to run
unmodified operating systems designed for the physical hardware.

2. Guest Operating Systems: Each virtual machine in full virtualization runs its own guest
operating system, which can be different from the host operating system. The guest
OS interacts with the virtualized hardware, unaware that it is running within a
virtualized environment.

3. Complete Isolation: Full virtualization offers strong isolation between virtual


machines. Each VM runs in its own protected memory space, and the actions or issues
in one virtual machine do not affect the operation of other virtual machines.

4. Resource Allocation: The hypervisor manages the allocation of physical resources,


such as CPU time, memory, storage, and network bandwidth, among the virtual
machines. Each VM receives a portion of the host machine's resources based on the
allocation policies and configurations.

5. Live Migration: Full virtualization often supports live migration, which allows virtual
machines to be moved from one physical host to another without service interruption.
Live migration enables workload balancing, hardware maintenance, and enhanced
availability.

6. Flexibility and Compatibility: Full virtualization enables running different operating


systems and applications on the same physical machine. It provides compatibility with
a wide range of operating systems, including various versions of Windows, Linux,
UNIX, and others.

7. Overhead: Full virtualization introduces a slight performance overhead due to the


hardware emulation layer. However, advancements in virtualization technologies and
hardware support, such as Intel VT-x or AMD-V, have significantly reduced this
overhead.

8. Management: Full virtualization environments typically include management tools


and interfaces that allow administrators to provision, configure, monitor, and manage
the virtual machines. These tools provide features like resource allocation, virtual
machine deployment, and performance monitoring.

Examples of hypervisors that support full virtualization include VMware ESXi, Microsoft
Hyper-V, and KVM (Kernel-based Virtual Machine).

Full virtualization has become a fundamental technology in data centers, cloud


computing, and virtualized infrastructure deployments. It enables efficient resource
utilization, consolidation of workloads, isolation, and flexibility in running multiple operating
systems and applications on a single physical machine.

Para Virtualization

Para-virtualization is a virtualization technique that involves modifying the guest


operating system to be aware of the virtualization layer. Unlike full virtualization, where the
guest operating system runs unmodified, para-virtualization requires some modifications to
the guest operating system kernel. These modifications allow the guest operating system to
communicate directly with the hypervisor, resulting in improved performance compared to
full virtualization. Here are the key characteristics and features of para-virtualization:
1. Modified Guest Operating System: In para-virtualization, the guest operating system
kernel is modified to include a special set of hypercalls or APIs that allow it to interact
with the hypervisor. These hypercalls replace certain privileged instructions that
would otherwise cause a trap or a hypervisor call.

2. Collaborative Interface: Para-virtualization requires close collaboration between the


guest operating system and the hypervisor. The guest operating system must be
aware of the virtualized environment and communicate with the hypervisor for
resource management, device access, and other operations.

3. Increased Performance: By eliminating or reducing the need for binary translation or


dynamic recompilation, para-virtualization can achieve better performance compared
to full virtualization. The direct communication between the guest operating system
and the hypervisor reduces the overhead associated with emulating hardware
devices.

4. Partial Hardware Emulation: Para-virtualization does not provide complete hardware


emulation like full virtualization. Instead, it exposes a paravirtualized interface to the
guest operating system, allowing it to make hypercalls to the hypervisor for privileged
operations.

5. Guest OS Portability: Para-virtualization requires modifications to the guest operating


system kernel, making it less portable compared to full virtualization. Each operating
system kernel needs to be specifically modified to support para-virtualization.
6. Improved Scalability: Para-virtualization can offer improved scalability by enabling
direct communication between the guest operating system and the hypervisor. This
allows for efficient use of system resources and better performance in environments
with a large number of virtual machines.

7. Examples: Xen is one of the popular hypervisors that supports para-virtualization. It


employs the Xen paravirtualized interface, which requires modifications to the guest
operating system to achieve enhanced performance.

Para-virtualization provides a balance between performance and flexibility by requiring


modifications to the guest operating system. It offers improved performance compared to
full virtualization while maintaining strong isolation between virtual machines. Para-
virtualization has been widely used in various environments, including cloud computing, high-
performance computing, and data centers.

Hardware Virtualization

Hardware virtualization, also known as hardware-assisted virtualization, refers to the


use of hardware features and extensions to enhance virtualization capabilities and
improve the performance and security of virtual machines. It involves the collaboration
between the physical hardware, the hypervisor, and the virtualization software to create
and manage virtual machines. Here are the key aspects and features of hardware
virtualization:

1. Virtualization Support in CPUs: Modern CPUs often include hardware support for
virtualization, such as Intel VT-x (Virtualization Technology) and AMD-V (AMD
Virtualization). These CPU features provide the necessary capabilities for efficient
virtualization, including memory management, CPU virtualization, and
input/output (I/O) virtualization.

2. CPU Virtualization: Hardware virtualization enables the hypervisor to create and


manage multiple virtual machines on a single physical machine. The CPU
virtualization features allow the hypervisor to efficiently allocate and share CPU
resources among virtual machines, ensuring each virtual machine gets its fair
share of CPU time.

3. Memory Management: Hardware virtualization supports memory virtualization,


allowing the hypervisor to allocate and manage memory resources for virtual
machines. The CPU's memory management unit (MMU) is used to translate virtual
memory addresses to physical memory addresses, providing isolation and
protection between virtual machines.

4. I/O Virtualization: Hardware virtualization extends to input/output (I/O) devices,


enabling virtual machines to interact with physical devices through virtualized
interfaces. This allows virtual machines to access network adapters, storage
devices, and other peripherals as if they were directly connected to them, while
the hypervisor manages the I/O requests and ensures isolation between virtual
machines.

5. Performance Optimization: Hardware virtualization features, such as CPU


virtualization and memory management enhancements, help reduce the
performance overhead associated with virtualization. These hardware-assisted
techniques improve the efficiency and performance of virtual machines, making
them perform closer to the level of native, non-virtualized systems.

6. Security Enhancements: Hardware virtualization also enhances the security of


virtualized environments. The hardware features provide isolation between
virtual machines, preventing one virtual machine from accessing or affecting the
resources of another. Additionally, features like Intel VT-d (Virtualization
Technology for Directed I/O) and AMD IOMMU (Input/Output Memory
Management Unit) offer improved I/O virtualization security by isolating I/O
device accesses.

7. Hypervisor Integration: Hardware virtualization features are leveraged by the


hypervisor to create and manage virtual machines efficiently. The hypervisor
communicates with the hardware through these features to allocate resources,
handle memory and I/O operations, and enforce security policies.

By leveraging hardware virtualization capabilities, virtualization technologies achieve


better performance, enhanced security, and improved resource management. These
features have become an essential part of modern virtualization platforms, enabling the
efficient execution of virtual machines in various environments, such as data centers,
cloud computing, and virtualized infrastructure deployments.

Virtualization of CPU, Memory and I/O devices

Virtualization of CPU, memory, and I/O devices is a fundamental aspect of virtualization


technology. It allows for the efficient sharing and management of these resources among
multiple virtual machines (VMs) running on a single physical machine. Here's an overview of
how CPU, memory, and I/O virtualization work:

1. CPU Virtualization:

 CPU virtualization enables the hypervisor to allocate and manage CPU


resources among virtual machines.

 The hypervisor uses hardware features, such as Intel VT-x (Virtualization


Technology) and AMD-V (AMD Virtualization), to create a virtual CPU (vCPU)
for each virtual machine.

 The vCPU is a virtual representation of a physical CPU core and is scheduled by


the hypervisor to execute instructions from the virtual machine.

 The hypervisor performs context switching between vCPUs, ensuring fair CPU
time allocation to each virtual machine.

2. Memory Virtualization:

 Memory virtualization allows virtual machines to have their own isolated


memory spaces while efficiently utilizing physical memory resources.
 The hypervisor uses hardware-assisted memory management features, such
as Extended Page Tables (EPT) in Intel VT-x and Nested Page Tables (NPT) in
AMD-V, to map virtual memory to physical memory.

 Each virtual machine operates in its own virtual address space, unaware of the
physical memory mapping managed by the hypervisor.

 Memory pages are dynamically allocated and shared among virtual machines,
optimizing memory usage and reducing overhead.

3. I/O Device Virtualization:

 I/O device virtualization enables virtual machines to access physical I/O


devices, such as network adapters, storage controllers, and graphics cards.

 The hypervisor provides virtualized interfaces to the virtual machines,


presenting them with virtual devices that emulate the functionality of physical
devices.

 The hypervisor intercepts I/O requests from virtual machines and performs the
necessary translations and operations to handle them on the physical devices.

 Techniques such as para-virtualization, direct device assignment (pass


through), or device emulation are used to virtualize I/O devices based on the
specific virtualization platform and device support.

By virtualizing CPU, memory, and I/O devices, virtualization technologies achieve efficient
resource utilization, isolation, and flexibility. Multiple virtual machines can run simultaneously
on a single physical machine, each with its own allocated CPU time, memory space, and access
to I/O devices. This allows for better consolidation of workloads, improved hardware
utilization, and flexible allocation of resources based on demand. The hypervisor plays a
crucial role in managing and coordinating the virtualization of these resources, providing an
abstraction layer between virtual machines and the underlying physical hardware.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy