Ccs372-Virtualization Notes
Ccs372-Virtualization Notes
CCS372
VIRTUALIZATION
NOTES
UNIT I INTRODUCTION TO VIRTUALIZATION 7
Virtualization and cloud computing - Need of virtualization – cost, administration, fast deployment,
reduce infrastructure cost – limitations- Types of hardware virtualization: Full virtualization - partial
virtualization - Paravirtualization-Types of Hypervisors
Virtualization and cloud computing are two interconnected technologies that have
revolutionized the way we compute and access information. While they are often
used together, they have distinct characteristics and purposes.
Virtualization
Virtualization is the process of creating a virtual version of a hardware resource,
such as a server, storage device, or network interface. This virtual version, often
referred to as a virtual machine (VM), can be accessed and managed as if it were a
physical machine.
Key benefits of virtualization:
• Efficiency: It allows multiple applications to run simultaneously on a single
physical server, reducing hardware costs.
• Flexibility: Virtual machines can be easily created, modified, and deleted,
enabling rapid deployment and scaling of applications.
• Resiliency: In case of hardware failures, virtual machines can be quickly
migrated to other physical servers, minimizing downtime.
• Isolation: Each virtual machine operates independently, preventing conflicts
and ensuring security.
Types of virtualization:
• Server virtualization: Creating multiple virtual servers on a single physical
server.
• Storage virtualization: Pooling multiple storage devices into a single logical
storage unit.
• Network virtualization: Creating virtual network interfaces and topologies.
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.
Key characteristics of cloud computing:
• On-demand self-service: Users can access resources as needed without
requiring significant interaction with service providers.
• Rapid elasticity: Resources can be scaled up or down quickly to meet
changing demands.
• Measured service: Cloud providers charge for resources based on usage,
ensuring transparency and cost control.
Types of cloud deployment models:
• Public cloud: Services are delivered over the internet to multiple customers.
• Private cloud: Services are dedicated to a single organization, often
managed within its own data center.
• Hybrid cloud: A combination of public and private clouds, allowing
organizations to leverage the benefits of both.
Cloud service models:
• Infrastructure as a Service (IaaS): Provides fundamental computing
resources, such as servers, storage, and networking.
• Platform as a Service (PaaS): Offers a development and deployment
platform for building applications.
• Software as a Service (SaaS): Delivers applications over the internet,
allowing users to access them through a web browser.
Relationship between Virtualization and Cloud Computing
• Virtualization is often a foundational technology for cloud computing.
• Many cloud providers use virtualization to create and manage virtual
machines that are then offered to customers as cloud services.
• By leveraging virtualization, cloud providers can efficiently allocate resources,
improve scalability, and enhance flexibility.
Cost Reduction
• Hardware Consolidation: Virtualization allows multiple operating systems
and applications to run concurrently on a single physical server. This
eliminates the need for multiple physical machines, resulting in significant
savings on hardware costs.
• Reduced Energy Consumption: Fewer physical servers mean less power
consumption, leading to lower energy bills and a reduced environmental
footprint.
• Simplified Licensing: Virtualization can help streamline software licensing by
allowing multiple virtual machines to share a single license, especially for
applications that are licensed per physical server.
Improved Administration
• Centralized Management: Virtualization platforms provide a centralized
console for managing multiple virtual machines. This simplifies administration
tasks, reduces errors, and improves overall efficiency.
• Faster Provisioning: New virtual machines can be created and deployed
quickly, reducing downtime and accelerating business processes.
• Disaster Recovery: Virtualization can facilitate easy creation of backups and
disaster recovery plans, ensuring business continuity in case of hardware
failures or other unforeseen events.
Faster Deployment
• Rapid Provisioning: Virtual machines can be created and configured in
minutes, allowing for faster application deployment and time-to-market.
• Testing and Development: Virtual environments can be used for testing and
development purposes, enabling rapid iteration and experimentation without
affecting production systems.
• Scalability: Virtualization provides the flexibility to scale resources up or
down as needed, ensuring that IT infrastructure can meet changing business
demands.
Reduced Infrastructure Costs
• Optimized Resource Utilization: Virtualization allows for more efficient
resource allocation, ensuring that hardware resources are used optimally.
• Reduced Physical Footprint: Fewer physical servers require less space in
data centers, reducing associated costs such as rent and cooling.
• Simplified Maintenance: Virtualization can simplify maintenance tasks,
reducing the need for specialized IT staff and associated costs.
Limitations in Virtualization
In full virtualization, the guest operating system (OS) runs directly on the hypervisor,
which acts as a layer between the guest OS and the physical hardware. The
hypervisor intercepts and emulates hardware instructions, providing the guest OS
with a complete illusion of a dedicated physical machine.
Key characteristics:
• Complete isolation: Each guest VM has its own isolated hardware
environment.
• Flexibility: Can run any guest OS that can be installed on physical hardware.
• Performance overhead: Some performance overhead is introduced due to
the emulation layer.
2. Paravirtualization
Hybrid Virtualization
Some hypervisors support hybrid virtualization, which combines elements of full and
paravirtualization. In this approach, the hypervisor can run both unmodified guest
OSes in full virtualization mode and modified guest OSes in paravirtualization mode.
This provides flexibility while maintaining good performance.
Hardware-Assisted Virtualization
A hypervisor is a software layer that sits between the hardware and the operating
systems (OSs) it hosts. It creates virtual machines (VMs) on a single physical
machine, allowing multiple OSs to run simultaneously. There are two primary types
of hypervisors:
1. Type 1 (Bare-Metal) Hypervisor
• Directly installed on hardware: This type of hypervisor is installed directly
onto the physical hardware without an underlying OS.
• Direct access to hardware resources: It has direct access to the hardware
resources, providing optimal performance and control.
• Used in large-scale data centers: Commonly used in large-scale data
centers and server farms due to its efficiency and scalability.
• Examples: VMware ESXi, KVM (Kernel-based Virtual Machine), Xen
2. Type 2 (Hosted) Hypervisor
• Runs on top of an existing OS: This type of hypervisor runs as an
application on top of an existing operating system.
• Indirect access to hardware resources: It has indirect access to hardware
resources through the host OS, which can introduce overhead.
• Suitable for personal use and smaller environments: Often used for
personal use, development, and smaller environments due to its ease of
installation and management.
• Examples: VirtualBox, VMware Workstation, Parallels Desktop
Key Differences Between Type 1 and Type 2 Hypervisors
Hardware
Direct Indirect (through host OS)
Access
Choosing the Right Hypervisor The choice between Type 1 and Type 2
hypervisors depends on your specific needs and requirements. Consider factors
such as:
• Performance: If you need optimal performance and resource utilization, a
Type 1 hypervisor is generally the better choice.
• Scalability: For large-scale deployments and high-performance workloads, a
Type 1 hypervisor can handle the demands.
• Ease of use: If you're new to virtualization or prefer a simpler setup, a Type 2
hypervisor may be more suitable.
• Cost: Type 1 hypervisors often require specialized hardware, which can
increase costs.
UNIT II SERVER AND DESKTOP VIRTUALIZATION 6
Virtual machine basics- Types of virtual machines- Understanding Server Virtualization- types of
server virtualization- Business Cases for Server Virtualization – Uses of Virtual Server Consolidation –
Selecting Server Virtualization Platform-Desktop Virtualization-Types of Desktop Virtualization
The best type of server virtualization for your needs depends on factors such as:
• Workload requirements: The type of applications and their resource needs.
• Performance requirements: The need for high performance and low latency.
• Management complexity: The level of technical expertise and administrative
overhead.
• Cost considerations: The initial investment and ongoing operational costs.
Desktop Virtualization
Key Concepts
• Physical Network: The underlying hardware infrastructure, including
switches, routers, and cables.
• Virtual Network: A logical network created on top of the physical network,
isolated from other virtual networks.
• Hypervisor: Software that manages the allocation of physical resources to
virtual machines and networks.
• Network Function Virtualization (NFV): The virtualization of network
functions, such as routers, firewalls, and load balancers, as software
applications.
8. Security Tools
• Protecting virtual networks: Security tools, including firewalls, intrusion
detection systems, and encryption mechanisms, are crucial for safeguarding
virtualized environments from threats.
Key Considerations for Tool Selection:
• Scalability: Ensure the tools can handle the expected growth of your virtual
network infrastructure.
• Integration: Consider compatibility with existing systems and tools in your IT
environment.
• Performance: Evaluate the tools' impact on network performance and
latency.
• Cost: Assess the licensing costs, maintenance requirements, and potential
operational savings.
• Support: Look for tools with adequate support resources, including
documentation and community forums.
VLAN Configuration
interface GigabitEthernet1/0/2
switchport mode trunk
switchport trunk allowed vlan 10,20
A Wide Area Network (WAN) is a computer network that extends beyond a single
location, often spanning multiple cities, states, countries, or even continents. It
connects multiple local area networks (LANs) and metropolitan area networks
(MANs) to form a larger network. WANs are essential for businesses, organizations,
and individuals who need to connect to remote systems, access data from different
locations, and collaborate with people around the world.
Key Components of a WAN Architecture
1. Routers: Routers are the backbone of a WAN, responsible for directing data
packets between different networks. They determine the best path for data to
travel based on network addresses and routing protocols. Routers can be
physical devices or software running on powerful servers.
2. Switches: Switches are used to connect devices within a LAN or MAN, but
they can also be used in WANs to connect multiple routers or other devices.
Switches operate at the data link layer of the OSI model, ensuring that data
packets are delivered to the correct destination within a network segment.
3. Modems: Modems are used to connect devices to the internet or other
WANs. They convert digital signals into analog signals (or vice versa) for
transmission over physical media such as telephone lines, cable TV networks,
or fiber optic cables.
4. Transmission Media: WANs use various types of transmission media to
carry data, including:
o Copper cables: Twisted pair cables and coaxial cables are commonly
used for shorter distances.
o Fiber optic cables: These cables offer high bandwidth, low
attenuation, and immunity to electromagnetic interference, making
them ideal for long-distance transmission.
o Wireless technologies: Satellite, microwave, and cellular networks
can be used for WAN connections, especially in areas where wired
infrastructure is unavailable or impractical.
WAN Architectures
There are several common WAN architectures, each with its own advantages and
disadvantages:
1. Hub-and-Spoke: In this architecture, a central hub (often a router) is
connected to multiple spoke nodes (other routers or devices). This is a simple
and scalable architecture but can be inefficient for large networks.
2. Mesh: In a mesh topology, every node is connected to every other node. This
provides high redundancy and fault tolerance but can be expensive and
complex to manage.
3. Partial Mesh: This is a combination of hub-and-spoke and mesh
architectures, where some nodes have direct connections to each other while
others are connected through a central hub.
4. Ring: In a ring topology, all nodes are connected in a circular fashion. This
provides high fault tolerance but can be difficult to troubleshoot and expand.
WAN Protocols
WAN Services
Many WAN providers offer a variety of services to meet the needs of businesses and
organizations, including:
• VPN (Virtual Private Network): Creates a secure, encrypted connection
between two networks, allowing remote users to access corporate resources
securely.
• MPLS (Multiprotocol Label Switching): A technology that provides efficient
routing and traffic management for IP-based networks.
• SD-WAN (Software-Defined WAN): A network architecture that uses
software to manage and control WAN functions, providing greater flexibility
and agility.
WAN Virtualization:
2. Page Table: The MMU uses a page table to map virtual addresses to
physical addresses. A page table is a data structure that contains entries for
each page of virtual memory. Each entry includes the physical address of the
corresponding page frame in physical memory, as well as other information
like protection bits (read-only, writeable, executable) and present/absent bits
(indicating whether the page is currently in physical memory or needs to be
fetched from disk).
Storage virtualization abstracts physical storage devices into a logical pool, providing
a more efficient and flexible way to manage data. There are primarily three types of
storage virtualization:
Remapping Process:
1. File Allocation: When a file is created, the operating system allocates space
for it on disk. This allocation may be contiguous or non-contiguous, depending
on the file system and available space.
2. Mapping Table Creation: A mapping table is created to store the
correspondence between logical addresses and physical addresses of file
blocks. This table can be stored in memory or on disk.
3. File Access: When an application requests to read or write a file block, the
operating system:
o Looks up the logical address of the block in the mapping table.
o Translates the logical address to the corresponding physical address.
o Reads or writes the block from/to the physical memory location.
Advantages of Block, File-Address Space Remapping:
• Efficiency: By providing a contiguous view of files, the operating system can
optimize memory access operations.
• Flexibility: Remapping allows files to be stored in non-contiguous locations
on disk, providing better space utilization and management.
• Virtual Memory Integration: Remapping can be integrated with virtual
memory systems to provide a unified memory space for applications,
regardless of whether the data is stored in physical memory or on disk.
Types of Remapping:
1. Direct Mapping: Each logical block is mapped to a fixed physical block. This
is simple but may not be efficient for files that grow or shrink.
2. Indexed Mapping: A separate index is used to store the mapping between
logical and physical addresses. This provides more flexibility but requires
additional overhead.
3. Segmented Mapping: The file is divided into segments, and each segment
has its own mapping table. This approach is suitable for large files or files with
complex access patterns.
Example:
Consider a file with 10 blocks. The mapping table might look like this:
0 1000
1 2000
2 3000
3 4000
4 5000
5 6000
6 7000
7 8000
8 9000
9 10000
When an application wants to read block 3, the operating system looks up the
mapping table and finds that block 3 is located at physical address 4000. It then
reads the block from memory location 4000 and returns it to the application.
Comparison Table
Storage
Block-level File-level Block-level
Type
Varies depending
Performance High Medium
on RAID level
Benefits of VMware
• Cost-Effectiveness: By running multiple VMs on a single physical server,
you can reduce hardware costs and energy consumption.
• Flexibility: VMware allows you to quickly create, deploy, and manage virtual
machines, making it easier to adapt to changing workloads and business
needs.
• Disaster Recovery: VMs can be easily backed up and restored, providing a
robust disaster recovery solution.
• Isolation: Each VM is isolated from the others, reducing the risk of one VM
affecting the performance of the others.
VMware Products
• VMware vSphere: The flagship product that provides a comprehensive
virtualization platform.
• VMware Workstation: A popular tool for creating and running virtual
machines on a personal computer.
• VMware Fusion: Similar to Workstation, but designed for macOS.
• VMware Cloud Foundation: A cloud infrastructure platform that combines
vSphere with other VMware technologies to deliver a complete cloud solution.
Use Cases for VMware
• Data Centers: VMware is widely used in data centers to consolidate physical
servers and improve resource utilization.
• Cloud Computing: Many public and private clouds are built on VMware
technology.
• Desktop Virtualization: VMware can be used to deliver virtual desktops to
users, providing centralized management and improved security.
• DevOps: VMware can help streamline the development and deployment of
applications by providing a flexible and scalable environment.
Amazon Web Services (AWS) is a cloud computing platform that offers a wide
range of on-demand services for individuals, businesses, and organizations. It
provides scalable infrastructure, storage, database, analytics, and more, enabling
users to build, run, and scale applications in the cloud.
Use Cases
• Web Applications: Build and deploy web applications at scale.
• Mobile Apps: Power backend services for mobile apps.
• Big Data: Process and analyze large datasets.
• Machine Learning: Develop and deploy machine learning models.
• IoT (Internet of Things): Process data from IoT devices.
• Gaming: Host multiplayer games and virtual worlds.
AWS has revolutionized the way businesses and individuals approach technology.
By providing a flexible, scalable, and reliable cloud platform, it empowers users to
focus on innovation and growth.
Microsoft Hyper-V:
Hyper-V Components
• Hypervisor: The core component that manages the virtualization process.
• Virtual Machine Management Manager (VMM): A graphical user interface
for creating, managing, and monitoring VMs.
• Hyper-V Manager: A standalone tool for managing Hyper-V hosts and VMs.
• Windows PowerShell: A command-line interface for automating Hyper-V
tasks and scripting.
Oracle VM VirtualBox
Use Cases:
• Software Testing: VirtualBox is ideal for testing software on multiple
operating systems without the need for physical hardware.
• Development: Developers can use it to create and test applications in
different environments.
• Education: Educators can use VirtualBox to demonstrate various operating
systems and software to students.
• Home Labbing: Enthusiasts can set up their own home labs to experiment
with different technologies and configurations.
• Gaming: While not as optimized for gaming as dedicated hardware,
VirtualBox can be used for casual gaming or testing game compatibility.
Advantages of VirtualBox:
• Free and Open-Source: VirtualBox is available at no cost and its source
code is open, allowing for community contributions and customization.
• Ease of Use: It offers a user-friendly interface and is relatively easy to learn
and use.
• Cross-Platform Compatibility: VirtualBox runs on Windows, macOS, Linux,
and other operating systems, providing flexibility.
• Extensive Features: It includes a wide range of features to cater to various
virtualization needs.
Oracle VM VirtualBox is a powerful and versatile virtualization tool that can be
used for a variety of purposes. Its free nature, ease of use, and extensive
feature set make it a popular choice for both personal and professional use.
IBM PowerVM
Introduction
This case study explores the virtualization of a small business network using
VMware vSphere. The business, a local retail store, was facing challenges with
scalability, maintenance, and resource utilization. By implementing virtualization, the
company aimed to improve efficiency, reduce costs, and enhance disaster recovery
capabilities.
Business Requirements
• Scalability: The business needed a solution to easily add or remove servers
as demand fluctuated.
• Efficiency: They sought to reduce hardware costs and energy consumption.
• Disaster Recovery: A robust plan was required to minimize downtime in case
of hardware failures or natural disasters.
• Centralized Management: The IT team desired a single platform to manage
all virtual machines.
Solution Architecture
• Hypervisor: VMware vSphere was chosen as the hypervisor due to its
widespread adoption, feature-richness, and compatibility with various
hardware platforms.
• Storage: A shared storage system (e.g., SAN or NAS) was implemented to
provide centralized data storage for the virtual machines.
• Networking: A virtual network infrastructure was created using vSphere's
networking capabilities, enabling logical isolation and traffic management.
Implementation Steps
1. Hardware Assessment: Existing hardware was evaluated to determine its
suitability for virtualization. If necessary, additional hardware was purchased
to meet the requirements.
2. vSphere Installation: The vSphere hypervisor was installed on the chosen
physical servers.
3. Virtual Machine Creation: The business's existing applications and operating
systems were migrated to virtual machines.
4. Storage Configuration: The shared storage system was connected to the
ESXi hosts and configured for use by the virtual machines.
5. Networking Setup: The virtual network infrastructure was created and
configured to match the existing physical network topology.
6. Disaster Recovery Planning: A disaster recovery plan was developed,
including backups, replication, and failover procedures.
Benefits Achieved
• Improved Scalability: The business could easily add or remove virtual
machines to accommodate changing workloads.
• Reduced Costs: Hardware consolidation and energy savings resulted in
significant cost reductions.
• Enhanced Efficiency: Centralized management and automated tasks
streamlined IT operations.
• Enhanced Disaster Recovery: The virtualization infrastructure provided a
robust disaster recovery solution, minimizing downtime in case of failures.
• Simplified Management: The IT team gained a unified platform for managing
all virtual machines.
Conclusion