CS-3 Virtualisation April 30th Wase Wims 2020 Prof A R Rahman
CS-3 Virtualisation April 30th Wase Wims 2020 Prof A R Rahman
CS-3 Virtualisation April 30th Wase Wims 2020 Prof A R Rahman
BITS Pilani
Introduction to Virtualisation
• AGENDA
Virtualisation
Introduction to Virtualization
Use & demerits of Virtualization
Virtualize Compute
resources
Need for Compute Virtualization
Hypervisor
x86 Architecture
x86 Architecture
APP
Hypervisor
Hypervisor
• Server consolidation
• Isolation
• Encapsulation
• Hardware independence
• Reduced cost
Requirements: x86 Hardware Virtualization
• The file systems supported by hypervisor are Virtual Machine File System
(VMFS) and Network File System (NFS)
• VMFS
• Is a cluster file system that allows multiple physical machines to perform
read/write on the same storage device concurrently
• Is deployed on FC and iSCSI storage apart from local storage
• NFS
• Enables storing VM files on a remote file server (NAS device)
• NFS client is built into hypervisor
Virtual Machine Hardware
RAM Keyboard
• Virtual machine (VM) can be configured with one or more virtual CPUs
vCPU
• Number of CPUs allocated to a VM can be changed
Virtual DVD/CD-ROM Drive • It maps a VM’s DVD/CD-ROM drive to either a physical drive or an .iso file
Virtual Floppy Drive • It maps a VM’s floppy drive to either a physical drive or an .flp file
Virtual SCSI Controller • VM uses virtual SCSI controller to access virtual disk
Virtual USB Controller • Maps VM’s USB controller to the physical USB controller
Virtual Machine Console
• Parameters that control the resources consumed by a child resource pool or a virtual
machine (VM) are as follows:
• Share
• Amount of CPU or memory resources a VM or a child resource pool can have
with respect to its parent’s total resources
• Limit
• Maximum amount of CPU and memory a VM or a child resource pool can
consume
• Reservation
• Amount of CPU and memory reserved for a VM or a child resource pool
Optimizing CPU Resources
Virtual CPU
Virtual
Physical
Core
Socket
• Each powered-on virtual machine (VM) needs its own swap file
• Created when the VM is powered-on
• Deleted when the VM is powered-off
• Swap file size is equal to the difference between the memory limit and the VM memory
reservation
• Hypervisor swaps out the VM’s memory content if memory is scarce
• Swapping is the last option because it causes notable performance impact
Physical to Virtual Machine (P2V) Conversion
P2V Conversion
• Hot conversion
• Occurs while physical machine is running
• Performs synchronization
• Copies blocks that were changed during the initial cloning period
• Performs power off at source and power on at target virtual machine (VM)
• Changes IP address and machine name of the selected machine, if both
machines must co-exist on the same network
• Cold conversion
• Occurs while physical machine is not running OS and application
• Boots the physical machine using converter boot CD
• Creates consistent copy of the physical machine
Hot Conversion Process
Converter server
running converter
software
Agent
Reconfiguration
Agent
Powered-on
Source Physical Source
Snapshot
Machine Volume
Powered-on
Source Physical Source
Volume
Machine
Destination Physical
Machine (Running
Hypervisor)
Cold Conversion Process (contd.)
Converter boot CD
Reconfiguration
Powered-on
Source Physical Source Step 3: Clones source
Machine Volume disk to VM disk
Destination Physical
Machine (Running
Hypervisor)
Storage Virtualization
Storage virtualization
Layers Examples
• Size of virtual disk file represents storage space allocated file file file file
NFS
VMFS
to virtual disk
• VMs remain unaware of
FC SAN
• Total space available to the hypervisor IP Network
Component Description
• Connects VMs to the VM network
Virtual NIC
• Sends/receives VM traffic to/from VM network
Virtual HBA(Host • Enables a VM to access FC(Fiber Channel) RDM disk/LUN assigned to the
Bus Adapter) VM
• Is an Ethernet switch that forms VM network
• Provides connection to virtual NICs and forwards VM traffic
Virtual switch
• Provides connection to hypervisor kernel and directs hypervisor traffic:
management, storage, VM migration
Physical adapter: NIC,
HBA, • Connects physical servers to physical network
CAN(Convereged • Forwards VM and hypervisor traffic to/from physical network
N/W adapter)
• Forms physical network that supports Ethernet/FC/iSCSI/FCoE
Physical switch,
• Provides connections among physical servers, between physical servers and
router
storage systems, and between physical servers and clients
Virtual Network Component: Virtual NIC
Application
Application Virtualization
Isolate the application from OS and hardware
Operating System
Desktop Virtualization
Isolate hardware from OS, application and user
state
Hardware
48
Desktop Virtualization
Desktop Virtualization
49
Benefits of Desktop Virtualization
• VM hosting/execution servers
• Connection Broker
Connection
broker Shared
Storage
PCs,
notebooks
thin clients
How does this work?
Server (HW1.js)
Server
require('http');
http.createServer
(…)
Cust 1
Cust 2
Admin
Physical machine
Cust 3
• Suppose Admin has a machine with 4 CPUs and 8 GB of memory, and three customers:
• Cust 1 wants a machine with 1 CPU and 3GB of memory
• Cust 2 wants 2 CPUs and 1GB of memory
• Cust 3 wants 1 CPU and 4GB of memory
• What should Alice do?
Resource allocation in virtualization
Cust 1
Virtual
machine
monitor
Cust 2
Admin
Physical machine
Virtual machines Cust 3
• Admin can sell each customer a virtual machine (VM) with the requested resources
• From each customer's perspective, it appears as if they had a physical machine all by
themselves (isolation)
How does it work?
VM 1 VM 2
VM Virt Phys App
1 0-99 0-99
App App
1 299-399 100-199
2 0-99 300-399 OS 1 OS 2
2 200-299 500-599
2 600-699 400-499
VMM
Translation table
Physical machine
Cust 1
Virtual
machine
Admin monitor
Cust 2
Physical machines
Cust 4
Cust 1
Virtual
machine
monitor
Cust 2
Admin
Physical machine
Cust 1
VMM
Cust 2
Admin
Physical machine
Virtual machines Cust 3
64
Cloud Computing WASE WIMS 2020