Unit Ii
Unit Ii
VIRTUALIZATION
Host Physical
Physical Storage Physical Networking
Hardware
• Virtualization has three characteristics that make it ideal for cloud
computing:
• Partitioning: In virtualization, many applications and operating systems
(OSes) are supported in a single physical system
by partitioning (separating) the available resources.
• Isolation: Each virtual machine is isolated from its host physical system
and other virtualized machines. Because of this isolation, if one virtual-
instance crashes, it doesn’t affect the other virtual machines. In addition,
data isn’t shared between one virtual container and another.
• Encapsulation: A virtual machine can be represented (and even stored) as
a single file, so you can identify it easily based on the service it provides. In
essence, the encapsulated process could be a business service. This
encapsulated virtual machine can be presented to an application as a
complete entity. Therefore, encapsulation can protect each application so
that it doesn’t interfere with another application.
Taxonomy of Virtualized Environment
Virtualization
How it is done? Technique
Model
Emulation Application
Execution
Programming
Environme Process Level High-Level VM
Language
nt
Storage Operating
Virtualizati Multiprogramming
System
on
Network Hardware-assisted
Virtualization
Full Virtualization
System Level Hardware
…. Paravirtualization
Partial
Virtualization
Execution virtualization
1)Machine reference model
Applications Applications
API calls
API
Libraries Libraries
User
System calls ISA
ABI
User
ISA
ISA
ISA
Hardware Hardware
2 Hardware Level virtualization
Guest
In memory
representation
Virtual Image
Storage
VMM Host emulation
Virtual Machine
binary translation
instruction mapping
interpretation
……
Host
3)Hardware Virtualization techniques
• Hardware assisted virtualization
• Full virtualization
• Para virtualization
• Partial virtualization
Hypervisors
4) OS level virtualization offers the opportunity to
create different and separated execution
environments for applications that are managed
concurrently. It is different from hardware
virtualization —there is no virtual machine manager
or hypervisor, and the virtualization is done within a
single operating system, where the OS kernel allows
for multiple isolated user space instances.
5)Programming level virtualization is mostly
used for achieving ease of deployment of
applications, managed execution, and
portability across different platforms and
operating systems. It consists of a virtual
machine executing the byte code of a
program, which is the result of the
compilation process.
6)Application level virtualization
Interpretation
Binary Translation
Virtualization and cloud
VM
VM VM VM VM VM
Server A Server B
(running) (running)
Before Migration
VM VM VM
VM VM VM
Server A Server B
(running) (inactive)
After Migration
Advantage and disadvantage of virtualization
Advantages:
• Eliminates the need for numerous dedicated servers;
• Cost effective because many times server software
installation provisioning is available;
• If one virtual server has a software failure, the other
servers will not be affected;
• Reduces energy costs because only one device is
running instead of several;
• Offers a flexibe IT infrastructure;
• Can quickly make changes with little downtime.
• Reduced spending. For companies with fewer than 1,000 employees, up
to 40 percent of an IT budget is spent on hardware. Purchasing multiple
servers is often a good chunk of this cost. Virtualizing requires fewer
servers and extends the lifespan of existing hardware. This also means
reduced energy costs.
• Easier backup and disaster recovery. Disasters are swift and unexpected.
In seconds, leaks, floods, power outages, cyber-attacks, theft and even
snow storms can wipe out data essential to your business. Virtualization
makes recovery much swifter and accurate, with less manpower and a
fraction of the equipment – it’s all virtual.
• More efficient IT operations. Going to a virtual environment can make
everyone’s job easier – especially the IT staff. Virtualization provides an
easier route for technicians to install and maintain software, distribute
updates and maintain a more secure network. They can do this with less
downtime, fewer outages, quicker recovery and instant backup as
compared to a non-virtual environment.
Disadvantages
• Resource hogging could occur if there are too many
virtual servers within a physical machine;
• As software updates and patches must be compatible
with everything running on the virtual machine, admins
may have reduced control over the physical environment;
• Administration, including backup and recovery, requires
specialized knowledge;
• If user experience is impacted, it can be difficult to
identify the root cause;
• Services offered by a dedicated server are more
accessible.
UNIT II
VIRTUALIZATION
• Why is it popular?
History
• 1960s Machines
– Did not scale well
– Extremely expensive
– Cost efficiency was desired
• RAM
– No set amount for RAM
– Estimate minimum amounts of RAM and upgrade
based on performance
Virtualization Hardware
• Networking
– Multiple network cards
required for increased
throughput
– Measure peak traffic
amounts
– Network Virtualization
Virtualization Hardware
• Storage
– Local storage on servers is limited
– Allow for 20% extra storage space for VM files and
server snapshots
– Storage Networks (highly recommended)
• Storage Area Network (SAN) – Large data transfers
• Network Attached Storage (NAS) – File-based data
storage
Pros and Cons of Server Virtualization
• Pros
– Cost
• Less physical servers
• Less server space (consolidation of servers)
• Less energy costs
• Less maintenance
– Efficient Administration
• Easier management, management through one machine
• Single point of failure
• Smaller IT staff
Pros and Cons of Server Virtualization
• Pros
– Growth and Scalability
• Upgrading one server upgrades them all
• Easy growth
• Less hardware complications
– Security
• Single server security maintenance
• Hypervisor software often provides security benefits
– Legacy Servers
• Upgrading servers to a virtual setup from old systems
• Goes hand-in-hand with scalability
Pros and Cons of Server Virtualization
• Cons
– Slow Performance
• High stress on single machine
• Longer processing times
• More network bottlenecking
Advantage:
• Has higher performance and good application isolation.
Shortcoming & limitation:
• Very expensive to implement (complexity)
Advantage:
• Has minimal startup/shutdown cost, low resource requirement, and high
scalability; synchronize VM and host state changes.
Advantage:
• It has very low implementation effort
Advantage:
• has the best application isolation
Application Application
Guest OS Guest OS
Physical Hardware
Full Virtualization
Application Application
Application
Guest OS Guest OS
Physical Hardware
Full Virtualization vs. Para-Virtualization
Full virtualization
• Does not need to modify guest OS, and critical instructions are
emulated by software through the use of binary translation.
• VMware Workstation applies full virtualization, which uses binary
translation to automatically modify x86 software on-the-fly to replace
critical instructions.
• Advantage: no need to modify OS.
• Disadvantage: binary translation slows down the performance.
Para virtualization
• Reduces the overhead, but cost of maintaining a paravirtualized OS
is high.
• The improvement depends on the workload.
• Para virtualization must modify guest OS, non-virtualizable
instructions are replaced by hypercalls that communicate directly
with the hypervisor or VMM.
• Para virtualization is supported by Xen, Denali and VMware ESX.
Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 88
UNIT II
VIRTUALIZATION
• Overview
– Introduction
– What to be virtualized
– Where to be virtualized
– How to be virtualized
Overview
• Introduction
• What to be virtualized ?
– Block, File system
• Where to be virtualized ?
– Host-based, Network-based, Storage-based
• How to be virtualized ?
– In-band, Out-of-band
Introduction
• Desirable properties of storage virtualization:
– Manageability
• Storage resource should be easily configured and deployed.
– Availability
• Storage hardware failures should not affect the application.
– Scalability
• Storage resource can easily scale up and down.
– Security
• Storage resource should be securely isolated.
Introduction
• Storage concept and technique
– Storage resource mapping table
– Redundant data
– Multi-path
– Data sharing
– Tiering
Concept and Technique
• Storage resource mapping table
Maintain tables to map storage resource to target.
Dynamic modify table entries for thin provisioning.
Use table to isolate different storage address space.
Concept and Technique
• Redundant data
– Maintain replicas to provide high availability.
– Use RAID technique to improve performance and
availability.
Concept and Technique
• Multi-path
– A fault-tolerance and performance
enhancement technique.
– There is more than one physical path
between the host and storage devices
through the buses, controllers,
switches, and bridge devices
connecting them.
Concept and Technique
• Data sharing
– Use data de-duplication technique to eliminate duplicated data.
– Save and improve the usage of storage space
Concept and Technique
• Tiering
– Automatic migrate data across storage resources with
different properties according to the significance or access
frequency of data.
– Example: iMac fusion drive
STORAGE VIRTUALIZATION
What To Be Virtualized
• Layers can be virtualized
User Space
– File system
Application
• Provide compatible system call
interface to user space System call interface
applications.
Kernel Space
– Block device File System
• Provide compatible block
Block interface
device interface to file system.
• Through the interface such as Device driver
SCSI, SAS, ATA, SATA, etc.
Storage Device
File System Level
• Data and Files
– What is data ?
• Data is information that has been converted to a machine-
readable, digital binary format.
• Control information indicates how data should be processed.
• Applications may embed control information in user data for
formatting or presentation.
• Data and its associated control information is organized into
discrete units as files or records.
– What is file ?
• Files are the common containers for user data, application code,
and operating system executables and parameters.
File System Level
• About the files
– Metadata
• The control information for file management is known as
metadata.
• File metadata includes file attributes and pointers to the location
of file data content.
• File metadata may be segregated from a file's data content.
• Metadata on file ownership and permissions is used in file access.
• File timestamp metadata facilitates automated processes such as
backup and life cycle management.
– Different file systems
• In Unix systems, file metadata is contained in the i-node structure.
• In Windows systems, file metadata is contained in records of file
attributes.
File System Level
• File system
– What is file system ?
• A file system is a software layer responsible for organizing and
policing the creation, modification, and deletion of files.
• File systems provide a hierarchical organization of files into
directories and subdirectories.
• The B-tree algorithm facilitates more rapid search and retrieval of
files by name.
• File system integrity is maintained through duplication of master
tables, change logs, and immediate writes off file changes.
– Different file systems
• In Unix, the super block contains information on the current state
of the file system and its resources.
• In Windows NTFS, the master file table contains information on all
file entries and status.
File System Level
• File system level virtualization
– File system maintains metadata
(i-node) of each file.
– Translate file access requests to
underlining file system.
– Sometime divide large file into
small sub-files (chunks) for
parallel access, which improves
the performance
Block Device Level
• Block level data
– The file system block
• The atomic unit of file system management is the file system
block.
• A file's data may span multiple file system blocks.
• A file system block is composed of a consecutive range of
disk block addresses.
– Data in disk
• Disk drives read and write data to media through cylinder,
head, and sector geometry.
• Microcode on a disk translates between disk block numbers
and cylinder/head/sector locations.
• This translation is an elementary form of virtualization.
Block Device Level
• Block device interface
– SCSI (Small Computer System Interface)
• The exchange of data blocks between the host system and
storage is governed by the SCSI protocol.
• The SCSI protocol is implemented in a client/server model.
• The SCSI protocol is responsible for block exchange but does
not define how data blocks will be placed on disk.
• Multiple instances of SCSI client/server sessions may run
concurrently between a server and storage.
Block Device Level
• Logical unit and Logical volume
– Logical unit
• The SCSI command processing entity within the storage target
represents a logical unit (LU) and is assigned a logical unit number
(LUN) for identification by the host platform.
• LUN assignment can be manipulated through LUN mapping, which
substitutes virtual LUN numbers for actual ones.
– Logical volume
• A volume represents the storage capacity of one or more disk drives.
• Logical volume management may sit between the file system and the
device drivers that control system I/O.
• Volume management is responsible for creating and maintaining
metadata about storage capacity.
• Volumes are an archetypal form of storage virtualization.
Block Device Level
• Data block level virtualization
– LUN & LBA
• A single block of information is
addressed using a logical unit
identifier (LUN) and an offset
within that LUN, which known as
a Logical Block Address (LBA).
– Apply address space remapping
• The address space mapping is
between a logical disk and a
logical unit presented by one or
more storage controllers.
• Introduction
• What to be virtualized
• Where to be virtualized
• How to be virtualized
• Case study
STORAGE VIRTUALIZATION
Where To Be Virtualized
• Storage interconnection
– The path to storage
• The storage interconnection provides the data path
between servers and storage.
• The storage interconnection is composed of both hardware
and software components.
• Operating systems provide drivers for I/O to storage assets.
• Storage connectivity for hosts is provided by host bus
adapters (HBAs) or network interface cards (NICs).
Where To Be Virtualized
• Storage interconnection protocol
– Fibre Channel
• Usually for high performance requirements.
• Supports point-to-point, arbitrated loop, and fabric interconnects.
• Device discovery is provided by the simple name server (SNS).
• Fibre Channel fabrics are self-configuring via fabric protocols.
– iSCSI ( internet SCSI )
• For moderate performance requirements.
• Encapsulates SCSI commands, status and data in TCP/IP.
• Device discovery by the Internet Storage Name Service (iSNS).
• iSCSI servers can be integrated into Fibre Channel SANs through IP
storage routers.
Where To Be Virtualized
• Abstraction of physical storage
– Physical to virtual
• The cylinder, head and sector geometry of individual disks is
virtualized into logical block addresses (LBAs).
• For storage networks, the physical storage system is
identified by a network address / LUN pair.
• Combining RAID and JBOD assets to create a virtualized
mirror must accommodate performance differences.
– Metadata integrity
• Storage metadata integrity requires redundancy for failover
or load balancing.
• Virtualization intelligence may need to interface with upper
layer applications to ensure data consistency.
Where To Be Virtualized
• Different approaches :
– Host-based approach
• Implemented as a software
running on host systems.
– Network-based approach
• Implemented on network
devices.
– Storage-based approach
• Implemented on storage target
subsystem.
Storage-based Virtualization
• Storage-based approach
– File level Block 1 Block 1 Block 1
• Storage pooling
• Replication and RAID
• Data sharing and tiering
Storage-based Virtualization
• Array-based virtualization
– Storage controller
• Provide basic disk virtualization in the form of RAID
management, mirroring, and LUN mapping or masking.
• Allocate a single LUN to multiple servers.
• Offer Fibre Channel, iSCSI,
and SCSI protocol.
– Cache memory
• Enhance performance.
– Storage assets coordination
• Coordination between
multiple storage systems
is necessary to ensure high
availability.
Storage-based Virtualization
• Data replication
– Array-based data replication
• Referred to as disk-to-disk replication.
• Requires that a storage controller function concurrently as
both an initiator and target.
– Synchronous vs. Asynchronous
• Synchronous data replication ensures that a write operation
to a secondary disk array is completed before the primary
array acknowledges task completion to the server.
• Asynchronous data replication provides write completion by
the primary array, although the transaction may still be
pending to the secondary array.
Storage-based Virtualization
Synchronous Asynchronous
To preserve performance, synchronous data Asynchronous data replication is largely
replication is limited to metropolitan distances immune to transmission latency
Storage-based Virtualization
• Other features
– Point-in-time copy ( snapshot )
• Provide point-in-time copies of an entire storage volume.
• Snapshot copies may be written to secondary storage arrays.
• Provide an efficient means to quickly recover a known good
volume state in the event of data from the host.
– Distributed modular virtualization
• Decoupling storage controller logic from physical disk banks
provides flexibility for supporting heterogeneous disk assets and
facilitates distributed virtualization intelligence.
• Accommodates class of storage services and data lifecycle
management.
Storage-based Virtualization
Distributed Modular Virtualization
Decoupling storage controller intelligence and virtualization engines from
physical disk banks facilitates multi-protocol block data access and
accommodation of a broad range of disk architectures.
Storage-based Virtualization
• Storage-based implementation
– Pros
• Provide most of the benefits of storage virtualization
• Reduce additional latency to individual IO
– Cons
• Storage utilization optimized only across the connected
controllers
• Replication and data migration only possible across the
connected controllers and the same vendors devices
– Examples
• Disk array products
UNIT II
VIRTUALIZATION
151
Network Virtualization
• What is network virtualization ?
– In computing, Network Virtualization is the process of
combining hardware and software network resources and
network functionality into a single, software-based
administrative entity, a virtual network.
• Two categories :
– External network virtualization
• Combining many networks, or parts of networks, into a virtual unit.
– Internal network virtualization
• Providing network-like functionality to the software containers on a
single system.
Network Virtualization
• Desirable properties of network virtualization :
– Scalability
• Easy to extend resources in need
• Administrator can dynamically create or delete virtual network
connection
– Resilience
• Recover from the failures
• Virtual network will automatically redirect packets by redundant links
– Security
• Increased path isolation and user segmentation
• Virtual network should work with firewall software
– Availability
• Access network resource anytime
153
Network Virtualization
• External network virtualization in different layers :
– Layer 1
• Seldom virtualization implement in this physical data transmission layer.
– Layer 2
• Use some tags in MAC address packet to provide virtualization.
• Example, VLAN.
– Layer 3
• Use some tunnel techniques to form a virtual network.
• Example, VPN.
– Layer 4 or higher
• Build up some overlay network for some application.
• Example, P2P.
Network Virtualization
• Internal network virtualization in different layers :
– Layer 1
• Hypervisor usually do not need to emulate the physical layer.
– Layer 2
• Implement virtual L2 network devices, such as switch, in hypervisor.
• Example, Linux TAP driver + Linux bridge.
– Layer 3
• Implement virtual L3 network devices, such as router, in hypervisor.
• Example, Linux TUN driver + Linux bridge + iptables.
– Layer 4 or higher
• Layer 4 or higher layers virtualization is usually implemented in guest
OS.
• Applications should make their own choice.
Introduction
External network virtualization
Internal network virtualization
NETWORK VIRTUALIZATION
Network Virtualization
• Two virtualization components :
– Device virtualization
• Virtualize physical devices in the
network
– Data path virtualization Data Path
• Virtualize communication path
between network access points Router
Switch
157
Network Virtualization
• Device virtualization
Layer 3 solution 3
– Layer 2 solution • VRF technique
• Divide physical switch ( Virtual Routing and Forwarding )
• Emulate isolated routing tables
into multiple logical
within one physical router.
switches.
158
Network Virtualization
• Data path virtualization
– Hop-to-hop case
• Consider the
virtualization applied on
a single hop data-path.
– Hop-to-cloud case
• Consider the
virtualization tunnels
allow multi-hop data-
path.
159
Network Virtualization
• Protocol approach
– Protocols usually used to approach data-path
virtualization.
– Three implementations
• 802.1Q – implement hop to hop data-path virtualization
• MPLS ( Multiprotocol Label Switch ) – implement
router and switch layer virtualization
• GRE (Generic Routing Encapsulation ) – implement
virtualization among wide variety of networks with
tunneling technique.
160
Network Virtualization
• 802.1Q
– Standard by IEEE 802.1
– Not encapsulate the
original frame
– Add a 32-bit field between
MAC address and
EtherTypes field
• ETYPE(2B): Protocol
identifier
• Dot1Q Tag(2B): VLAN
number, Priority code
CE: Customer Edge router
PE: Provider Edge router
161
Network Virtualization
• Example of 802.1Q
VN 1
Source destination
Physical Network
VN 2
162
Source destination
Network Virtualization
• MPLS ( Multiprotocol Label Switch )
– Also classified as layer 2.5 virtualization
– Add one or more labels into package
– Need Label Switch Router(LSR) to read MPLS
header
163
Network Virtualization
• Example of MPLS
5
4 VN 1
2
7 9
8
165
Introduction
External network virtualization
Internal network virtualization
NETWORK VIRTUALIZATION
Internal Network Virtualization
• Internal network virtualization
– A single system is configured with containers, such as the Xen
domain, combined with hypervisor control programs or pseudo-
interfaces such as the VNIC, to create a “network in a box”.
– This solution improves overall efficiency of a single system by
isolating applications to separate containers and/or pseudo
interfaces.
– Virtual machine and virtual switch :
• The VMs are connected logically to each other so that they can send
data to and receive data from each other.
• Each virtual network is serviced by a single virtual switch.
• A virtual network can be connected to a physical network by
associating one or more network adapters (uplink adapters) with the
virtual switch.
Internal Network Virtualization
• Properties of virtual switch
– A virtual switch works much like a physical Ethernet switch.
– It detects which VMs are logically connected to each of its
virtual ports and uses that information to forward traffic to the
correct virtual machines.
• Typical virtual network configuration
– Communication network
• Connect VMs on different hosts
– Storage network
• Connect VMs to remote storage system
– Management network
• Individual links for system administration
Internal Network Virtualization
Network virtualization example form VMware
Traditional Approach
• In KVM system
– KVM focus on CPU and memory virtualization, so IO
virtualization framework is completed by QEMU project.
– In QEMU, network interface of virtual machines connect
to host by TUN/TAP driver and Linux bridge.