Unit i Virtualization
Unit i Virtualization
INTRODUCTION TO VIRTUALIZATION
Explain Virtualization
Virtualization is a technology that allows for the creation of virtual instances or representations
of physical resources, such as servers, storage devices and networks, using specialized software called a
hypervisor or Virtual Machine Monitor (VMM). These virtual instances can then be used to run
multiple operating systems, applications or services independently and concurrently on a single physical
host machine.
Cloud Computing
Cloud computing is a model of delivering IT services over the internet, allowing users to access
resources on demand without having to manage the underlying infrastructure. It provides a
scalable, flexible, and cost-effective way to access computing resources.
Benefits of IaaS:
• IaaS can make workloads more flexible, faster, easier, and more cost efficient
• IaaS can scale up or down as needed, providing greater flexibility compared to on-premise infrastructures .
IaaS components :
• Network: Includes virtualized elements like switches, routers, gateways, and bridges.
• Storage: Includes various types of cloud storage.
Compute: Includes several layers of compute components.
PASS :
• Platform as a Service (PaaS) is a cloud computing model that provides a complete environment for building,
running, and managing applications.
• Google App Engine-A scalable serverless PaaS platform that is part of the Google Cloud ecosystem.
• Microsoft Azure
• A cloud-hosted system that allows developers to create, distribute, and maintain applications.
Benefits of PaaS
• Faster app development: Developers can focus on coding instead of maintaining hardware or updating
software
• Cost savings: Avoids the expense of buying and managing software licenses and infrastructure
• Scalability: Automatically scales to meet demand
• Security: Often includes built-in security and data protection
SASS :
• Software as a Service (SaaS) is a cloud-based model for delivering software applications to users. SaaS is
one of the most popular cloud computing models.
• EXAMPLES:
• Zoom-A video conferencing and webinar platform that became popular during the pandemic .
• Canva-A free online platform that helps users create graphics, logos, and videos.
Limitations of Virtualization:
While virtualization offers many benefits, such as cost savings, resource optimization, and scalability, it also has
several limitations:
1. Performance Overhead :
• Virtual machines (VMs) are slower than physical machines due to hypervisor management and resource
sharing.
• Applications requiring high processing power (e.g., real-time processing, gaming, or database-intensive
tasks) may face performance issues.
2. Increased Complexity
• Managing virtualized environments requires specialized skills.
• Troubleshooting performance issues, network configurations, and resource allocation can be complex.
3. Hardware Limitations
•Some hardware features (e.g., graphics processing units (GPUs), special peripherals) may not work well in a
virtualized environment.
•Older hardware may not support virtualization technologies like Intel VT-x or AMD-V.
4. Security Risks
• If the hypervisor is compromised, all virtual machines running on it are at risk (Hyperjacking attacks).
• VM escape attacks allow a malicious VM to break out and access the host system.
5. Licensing and Compliance Issues
• Software vendors may have strict licensing policies for virtualized environments.
• Some enterprise applications may not be licensed to run on virtual machines.
6. Resource Allocation Challenges
• Over-provisioning (assigning more resources than available) can lead to system slowdowns.
• Under-provisioning can cause VMs to struggle for CPU, memory, or storage.
7. Dependency on the Hypervisor
• If the hypervisor crashes, all virtual machines running on it fail.
• Performance depends on how efficiently the hypervisor manages multiple VMs.
8. Backup and Recovery Complexity
• Backing up virtualized environments requires specialized tools and processes.
• Restoring individual VMs can be more complex than restoring a traditional physical server.
9. Latency in I/O Operations
• Disk and network input/output (I/O) operations are slower compared to a physical system.
• Applications needing low-latency (e.g., financial trading platforms) may face bottlenecks.
10. Not Suitable for All Workloads
• Some workloads (e.g., high-performance computing (HPC), real-time processing) perform better on
bare-metal servers rather than virtual machines.
2.Paravirtualization:
In full virtualization (like in VMware or VirtualBox), the guest OS runs as if it were on real hardware, unaware
that it is virtualized. The hypervisor emulates hardware, which introduces overhead and reduces performance.
In paravirtualization, the guest OS knows it is running in a virtualized environment and interacts with the
hypervisor through hypercalls instead of hardware emulation. This reduces overhead and improves speed.
• Paravirtualization is a virtualization technique where the
guest operating system (OS) is modified to work efficiently
with the hypervisor.
• It doesn't completely simulate the underlying hardware.
• Xen is a hypervisor that supports paravirtualization.
• Guest operating systems running on Xen are modified to
interact with the hypervisor directly.
Guest OS Installation:
Execution of Instructions:
Control Transfer:
Whenever a privileged operation is needed, the system may switch control from the guest OS to the host
hardware, or allow direct access (which saves time but reduces isolation).
This approach reduces overhead and increases speed, but it offers less isolation and security than full
virtualization.
Hypervisor :
• A hypervisor, also known as a virtual machine monitor or VMM, is software that creates and runs virtual
machines (VMs). A hypervisor allows one host computer to support multiple guest VMs by virtually sharing
its resources, such as memory and processing.
• Importance: Enables virtualization by allowing multiple operating systems to run on a single physical
machine.
Types of Hypervisors :
Type 1 (Bare Metal):
installed directly on the computer’s hardware instead of the operating system.
It does not require any base server operating system. It has direct access to hardware resources.
Examples of Type 1 hypervisors include VMware ESXi, Citrix XenServer, and Microsoft Hyper-V
hypervisor.
- High performance and security. Such kinds of hypervisors are very efficient because they have direct
access to the physical hardware resources(like Cpu, Memory, Network, and Physical storage). This causes
the empowerment of the security because there is nothing any kind of the third party resource so that attacker
couldn’t compromise with anything.
One problem with Type-1 hypervisors is that they usually need a dedicated separate machine to perform
their operation and to instruct different VMs and control the host hardware resources.
Type 2 (Hosted):
- installed on an existing operating system(OS).
- Examples: VMware Workstation, Oracle VirtualBox.
- Easier to install but less efficient.
Such kind of hypervisors allows quick and easy access to a guest Operating System alongside the host
machine running.
Here there is no direct access to the physical hardware resources so the efficiency of these hypervisors lags
in performance as compared to the type-1 hypervisors, and potential security risks.
Hypervisor Type-1 And Type- 2
TYPE-2Hypervisor:
A Host operating system runs on the underlying host system. It is also known as ‘Hosted Hypervisor”. Such
kind of hypervisors doesn’t run directly over the underlying hardware rather they run as an application in a
Host system(physical machine). Basically, the software is installed on an operating system. Hypervisor asks
the operating system to make hardware calls. An example of a Type 2 hypervisor includes VMware Player
or Parallels Desktop. Hosted hypervisors are often found on endpoints like PCs. The type-2 hypervisor is
very useful for engineers, and security analysts (for checking malware, or malicious source code and newly
developed applications).
Pros & Cons of Type-2 Hypervisor:
Pros: Such kind of hypervisors allows quick and easy access to a guest Operating System alongside the host
machine running. These hypervisors usually come with additional useful features for guest machines. Such
tools enhance the coordination between the host machine and the guest machine.
Cons: Here there is no direct access to the physical hardware resources so the efficiency of these hypervisors
lags in performance as compared to the type-1 hypervisors, and potential security risks are also there an
attacker can compromise the security weakness if there is access to the host operating system so he can also
access the guest operating system.
Advantages of Hypervisors
Efficient resource utilization.
Cost savings (less hardware needed).
Isolation and security between VMs.
Flexibility and scalability.
Easy backup and recovery.
Choosing the Right Hypervisor The choice between Type 1 and Type 2 hypervisors depends
on your specific needs and requirements. Consider factors such as:
Hardware
Direct Indirect (through host OS)
Access
Need of Virtualization
Virtualization is needed in modern computing environments due to several practical, financial, and
operational benefits. Below are the main reasons:
1. Cost Savings
Fewer Physical Servers: Less hardware means lower purchasing and maintenance costs.
Energy Efficiency: Reduces electricity consumption and cooling needs, saving money.
2. Simplified Administration
Centralized Management: Admins can manage all virtual machines from a single dashboard.
Easy Backups & Snapshots: Take quick snapshots of VMs for backup or recovery.
Cloning & Templates: Easily duplicate machines or use templates to create new VMs.
Quick Setup: New virtual machines can be created in minutes, unlike physical servers that take
hours or days.
Testing and Development: Developers can spin up testing environments quickly, try different
configurations, and discard them easily.
Space-Saving: Fewer physical machines means less space needed in server rooms.
Less Hardware, More Flexibility: Organizations can do more with less equipment.
Consolidation: Run many services on fewer physical systems.
"Virtualization reduces the need for big server rooms and bulky hardware."
5. Resource Optimization
• Improved Hardware Utilization: By partitioning a physical server into
multiple virtual machines (VMs), organizations can maximize the use of
their hardware resources. This prevents underutilization and reduces the
need for additional physical servers.
• Dynamic Resource Allocation: Virtualization enables flexible resource
allocation based on demand. VMs can be scaled up or down to
accommodate fluctuating workloads, ensuring optimal performance and
cost-effectiveness.
2.HOST:
The host represents the original environment where the guest is supposed to be managed. Each guest
runs on the host using shared resources donated to it by the host. The operating system, works as the
host and manages the physical resource management, and the device support.
3.VIRTUALIZATIONLAYER:
The virtualization layer is responsible for recreating the same or a different environment where the guest
will operate. It is an additional abstraction layer between a network and storage hardware, computing,
and the application running on it. Usually it helps to run a single operating system per machine which
can be very inflexible compared to the usage of virtualization.
1.Server virtualization
Server virtualization is a process that partitions a physical server into multiple virtual servers. It is an
efficient and cost-effective way to use server resources and deploy IT services in an organization. Without
server virtualization, physical servers use only a small amount of their processing capacities, which leave
devices idle.
2. Storage virtualization
Storage virtualization combines the functions of physical storage devices such as network attached storage
(NAS) and storage area network (SAN). You can pool the storage hardware in your data center, even if it
is from different vendors or of different types. Storage virtualization uses all your physical data storage
and creates a large unit of virtual storage that you can assign and control by using management software.
IT administrators can streamline storage activities, such as archiving, backup, and recovery, because they
can combine multiple network storage devices virtually into a single storage device.
3. Network virtualization
Any computer network has hardware elements such as switches, routers, and firewalls. An organization
with offices in multiple geographic locations can have several different network technologies working
together to create its enterprise network. Network virtualization is a process that combines all of these
network resources to centralize administrative tasks. Administrators can adjust and control these elements
virtually without touching the physical components, which greatly simplifies network management.
4. Software-defined networking
Software-defined networking (SDN) controls traffic routing by taking over routing management from data
routing in the physical environment. For example, you can program your system to prioritize your video
call traffic over application traffic to ensure consistent call quality in all online meetings.
Network function virtualization technology combines the functions of network appliances, such as
firewalls, load balancers, and traffic analyzers that work together, to improve network performance.
6. Desktop virtualization
Most organizations have nontechnical staff that use desktop operating systems to run common business
applications. For instance, you might have the following staff:
A customer service team that requires a desktop computer with Windows 10 and customer-relationship
management software
A marketing team that requires Windows Vista for sales applications
You can use desktop virtualization to run these different desktop operating systems on virtual machines,
which your teams can access remotely. This type of virtualization makes desktop management efficient
and secure, saving money on desktop hardware. The following are types of desktop virtualization.
difference between para and full virtualization :
Feature
Full Virtualization Para Virtualization
Virtualizes part of the hardware; the guest
Virtualizes the entire hardware, so
Definition OS is modified to interact with the
the guest OS runs unchanged.
hypervisor.
Guest OS ✅ Required (OS must be aware it's
❌ Not required
Modification virtualized)
Higher (less overhead, more direct
Performance Lower (due to instruction emulation)
communication)
Hardware Some direct access allowed (optimized
Through hypervisor/emulation
Access calls)
Supports any OS (even unmodified Only supports modified OS that are aware
Compatibility
ones) of the hypervisor
Xen (with modified Linux kernel), Oracle
Example VMware, VirtualBox
VM (Paravirtual mode)