Cloud Computing Handout
Cloud Computing Handout
Cloud Computing Handout
CSIW ZG527
BITS Pilani
Pilani Campus
BITS Pilani, Pilani Campus
Cloud Computing
• The content for these slides has been obtained from books and various other source on the Internet
• I here by acknowledge all the contributors for their material and inputs and gratefully acknowledge people others
who made their course materials freely available online.
• .I have provided source information wherever necessary
• Students are requested to refer to the textbook w.r.t detailed content of the presentation deck that is expected to
• The faculty team has modified the sourced content flow to suit the requirements of this WIMS section class
It is important to know that just login to the session does not guarantee the attendance.
Once you join the session, continue till the end to consider you as present in the class.
IMPORTANTLY, you need to make the class more interactive by responding to Professors queries
in the session.
Whenever Professor calls your number / name ,you need to respond, otherwise it will be
considered as ABSENT
• Content
Virtualisation
Introduction to Virtualization
Virtualization in the cloud - Transforming a Classic Data Center (CDC) into a Virtualized Data
Center
Virtualize Compute
Compute Virtualization
Hypervisor
x86 Architecture x86 Architecture
NIC Card Memory Hard Disk CPU NIC Card Memory Hard Disk
CPU
Hypervisor
It is a software that allows multiple operating systems (OSs) to run concurrently
on a physical machine and to interact directly with the physical hardware.
– Kernel
VMM VMM VMM
– Virtual Machine Monitor (VMM) Hypervisor (Kernel and VMM)
x86 Architecture
APP
Hypervisor Hypervisor
x86 Architecture Operating System
x86 Architecture
Server consolidation
Isolation
Encapsulation
Hardware independence
Reduced cost
An operating system (OS) is designed to run on a bare-metal hardware and to fully own
the hardware
– x86 architecture offer four levels of privilege
Ring User Apps
• Ring 0, 1, 2, and 3
3
• User applications run in Ring 3 Ring
• OS run in Ring 0 (most privileged) 2
Ring
Challenges of virtualizing x86 hardware 1
Ring OS
– Requires placing the virtualization layer below the OS layer 0
– Is difficult to capture and translate privileged OS instructions at runtime
X86 Hardware
VMM decouples guest operating system (OS) from the underlying physical hardware Ring User Apps
3
Each VM is assigned a VMM Ring
2
– Provides virtual components to each VM Ring Guest OS
1
– Performs Binary Translation (BT) of non-virtualizable OS instructions Ring Hypervisor
0
Guest OS is not aware of being virtualized Physical Machine
X86 Hardware
Guest operating system (OS) knows that it is virtualized Ring User Apps
3
Ring
Guest OS runs in Ring 0
2
Ring
Modified guest OS kernel is used, such as Linux and OpenBSD 1 Paravirtualized
Ring Guest OS
0
Unmodified guest OS is not supported, such as Microsoft Windows Hypervisor
Physical Machine
X86 Hardware
Achieved by using hypervisor-aware CPU to handle privileged instructions Ring 3 User Apps
Ring 2
– Reduces virtualization overhead caused due to full and paravirtualization
Ring 1
– CPU and Memory virtualization support is provided in hardware
Ring 0 Guest OS
Enabled by AMD-V and Intel VT technologies in the x86 processor architecture
VMM
Physical Machine
X86 Hardware
Hypervisor
– Contains virtual components such as CPU, RAM, disk, and NIC x86 Architecture
Virtual BIOS File • Stores the state of the virtual machine’s (VM’s) BIOS
• Is a VM’s paging file which backs up the VM RAM contents
Virtual Swap File
• The file exists only when VM is running
• Stores the contents of the VM’s disk drive
Virtual Disk File • Appears like a physical disk drive to VM
• VM can have multiple disk drives
• Keeps a log of VM activity
Log File
• Is useful for troubleshooting
• Stores the configuration information chosen during VM creation
Virtual Configuration File • Includes information such as number of CPUs, memory, number and type
of network adaptors, and disk types
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
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
BITS Pilani, Pilani Campus
Virtual Machine Console
Resource management
Resource pool
Administrators may create child resource pool or virtual machine (VM) from the parent resource pool
Reservation, limit, and share are used to control the resources consumed by resource pools or VMs
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
Hypervisors support multi-core, hyper-threading, and CPU load-balancing features to optimize CPU
resources
Virtual CPU
Virtual
Physical
Core
Socket
Makes a physical CPU appear as two Logical CPUs (LCPUs) VM with VM with VM with
one CPU two CPUs one CPU
– Enables operating system (OS) to schedule two or more threads
simultaneously
LCP LCP
U U
VMs can be configured with more memory than physically available, called ‘memory overcommitment’
Memory management techniques are Transparent page sharing, memory ballooning, and memory
swapping
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
P2V Conversion
It is a process through which physical machines are converted into virtual machines (VMs).
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
Converter server
running converter
software
Step 1: Converter
server installs agent on Step 3: Creates VM
source physical on destination
machine machine
Agent
Step 4: Clones
source disk to VM
Powered-on disk
Source Physical Source
Snapshot
Machine Volume
Converter server
running converter
software
Reconfiguration
Agent
Powered-on
Source Physical Source
Snapshot
Machine Volume
Powered-on
Source Physical Source
Volume
Machine
Destination Physical
Machine (Running
Hypervisor)
Converter boot CD
Reconfiguration
Powered-on
Source Physical Source Step 3: Clones
Machine Volume source disk to VM
disk
Destination Physical
Machine (Running
Hypervisor)
Storage virtualization
It is the process of masking the underlying complexity of physical storage resources and
presenting the logical view of these resources to compute systems.
Virtual volumes are created from the storage pools and are assigned to the compute system
Layers Examples
• Block-level virtualization
Network
• File-level virtualization
• Virtual Provisioning
Storage
• Automated Storage Tiering
Compute Compute
VMs are stored as set of files on storage space available to hypervisor 1 2
‘Virtual disk file’ represents a virtual disk used by a VM to store its data VM VM
3 4
Size of virtual disk file represents storage space allocated to virtual disk
Virtual Virtual Virtual Virtual
VMs remain unaware of disk file disk file disk file disk file
VMF NF
– Total space available to the hypervisor S S
– Underlying storage technologies
FC IP
SAN Network
FC iSC NA
Storage SI BITS Pilani, Pilani Campus
S
File System for Managing VM Files
– Hypervisor’s native file system called Virtual Machine File System (VMFS)
Network Virtualization
It is a process of logically segmenting or grouping physical network(s) and making them operate as
single or multiple independent network(s) called “Virtual Network(s)”.
Restricts management traffic, including ‘Network Broadcast’, from propagating to other virtual network
Enables functional grouping of nodes in a virtual network
Physical Network
Hypervisor Hypervisor
Storage Array
Benefit Description
• Restricts access to nodes in a virtual network from another virtual
Enhances security network
• Isolates sensitive data from one virtual network to another
• Restricts network broadcast and improves virtual network
Enhances performance
performance
• Allows configuring virtual networks from a centralized
Improves manageability management workstation using management software
• Eases grouping and regrouping of nodes
• Enables multiple virtual networks to share the same physical
Improves utilization and network, which improves utilization of network resource
reduces CAPEX • Reduces the requirement to setup separate physical networks for
different node groups
Component Description
• Connects VMs to the VM network
Virtual NIC
• Sends/receives VM traffic to/from VM network
Virtual HBA • Enables a VM to access FC RDM disk/LUN assigned to the 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, • Connects physical servers to physical network
HBA, CNA • Forwards VM and hypervisor traffic to/from physical network
• Forms physical network that supports Ethernet/FC/iSCSI/FCoE
Physical switch, router • Provides connections among physical servers, between physical servers and
storage systems, and between physical servers and clients
Application
Application Virtualization
Isolate the application from OS and hardware
Operating System
Desktop Virtualization
Isolate hardware from OS, application and
user state
Hardware
Desktop Virtualization
Simplified PC maintenance
Flexibility of access
Desktop virtualization techniques provide ability to centrally host and manage desktop environments
Improved security
Centralized management
• VDI involves hosting desktop which runs as VM on the server in the VDC
VM execution
Endpoint devices server
• Endpoint devices
Connection
• VM hosting/execution servers broker Shared
Storage
• Connection Broker
PCs,
notebooks
thin clients
Server (HW1.js)
Server
require('http');
http.createServer
(…)
Your VM
Cust 1
Cust 2
Admin
Physical machine
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 Admin do?
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)
Ap VM 2
VM Virt Phys
p Ap
1 0-99 0-99
Ap
1 299-399 100-199
p p
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
Cust 4
Cust 1
Virtual
machine
monitor
Cust 2
Admin
Physical machine
What if Admin gets another customer?
Virtual machines Cust 3
– Multiple VMs can time-share the existing resources
– Result: Admin has more virtual CPUs and virtual memory than physical resources (but not all can be active
at the same time)
Cust 4
Cust 1
VMM
Cust 2
Admin
Physical machine
Virtual machines Cust 3
Good: Cust 4 can't access Cust 3’s data
Bad: What if the load suddenly increases?
– Example: Cust 4 VM shares CPUs with Cust 3's VM, and Cust 3 suddenly starts a large compute job
– Cust 4 performance may decrease as a result
– VMM can move Cust 4 's software to a different CPU, or migrate it to a different machine
Type -2 Hypervisor
Windows Sandbox – Light weight virtual Machine isolated, temporary virtual environment
Hyper-V Hyper-V virtual machines, Hypervisor on windows platform for virtualisation
Type -2 Hypervisor
Oracle Virtual Box
Ubuntu 22.04 LTS Jammy Jellyfish – With KVM Virtualization Running a Debian Distro inside it with VMM-
for live monitoring - Nested Paging, KVM Paravirtualization.
Ubuntu 23.04 Lunar Lobster to save the state of the virtual machines -Nested Paging,, KVM
Paravirtualization.
Storage Virtualisation – Oracle Database 23c VM appliance for data persistence Nested Paging, PAE/NX,
KVM Paravirtualization.
R1 Moving To The Cloud: Developing Apps in the New World of Cloud Computing 1st
Edition
by Dinkar Sitaram (Author), Geetha Manjunath (Author)