UNIT II virtualization
UNIT II virtualization
VIRTUALIZATION BASICS
Virtual machines (VMs) are an essential component of cloud computing and virtualization
technology. Here are the basics of virtual machines:
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.
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.
A taxonomy of virtual machines categorizes them based on different characteristics and use
cases. Here's a taxonomy of virtual machines:
Examples: Java Virtual Machine (JVM), Common Language Runtime (CLR) for
.NET.
Examples: Java Virtual Machine (JVM) for running Java applications, Adobe
Flash Player.
Examples: Cisco Cloud Services Router (CSR), Juniper Networks vMX Virtual
Router.
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.
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.
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.
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.
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.
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.
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 host machine runs the hypervisor or virtualization software that manages
and controls the virtualized environment.
The hypervisor is a software layer that enables the creation, management, and
execution of virtual machines.
Each virtual machine runs its own operating system and applications as if it
were running on a physical machine.
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:
Multiple guest operating systems can run simultaneously on the same physical
machine, each unaware that it is running within a virtualized environment.
2. Para-virtualization:
Containers share the same kernel and underlying OS libraries, but each
container has its own isolated runtime environment.
4. Hardware-assisted Virtualization:
These features, such as Intel VT-x (Virtualization Technology) and AMD-V (AMD
Virtualization), provide hardware support for virtualization, improving
performance and security.
5. Application-level 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:
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.
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.
Examples of hypervisors that support full virtualization include VMware ESXi, Microsoft
Hyper-V, and KVM (Kernel-based Virtual Machine).
Para Virtualization
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.
1. CPU Virtualization:
The hypervisor performs context switching between vCPUs, ensuring fair CPU
time allocation to each virtual machine.
2. Memory Virtualization:
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.
The hypervisor intercepts I/O requests from virtual machines and performs the
necessary translations and operations to handle them on the physical devices.
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.