Cloud technologies
ACTS, CDAC Bangalore.
Topics for the day
Cloud Computing
Virtualization
Containerization
Cloud Service models
Cloud Deployment models
Services provided by Cloud
Cloud development best practices
Introduction to AWS and Services
Introduction to cloud
Cloud computing is the on-demand availability of computer system
resources, especially data storage and computing power, without
direct active management by the user.
The availability of high-capacity networks, low-cost computers and
elastic-storage as well as the widespread adoption of hardware
virtualization, service-oriented architecture and autonomic and
utility computing has led to growth in cloud computing.
cloud computing allows companies to avoid or minimize up-front IT
infrastructure costs
The main enabling technology for cloud computing is virtualization.
What is it ?
Act of creating a virtual
(rather than actual) version of
something including :
Virtual computer hardware
platforms
Operating systems
Storage devices
Computer network resources.
Key Technology in Cloud Computing
Cloud Computing Virtualization
Virtualization Cloud Computing
How does it work?
Virtualization transforms hardware into software.
It is the creation of a fully functional virtual
computer that can run its own applications and
operating system.
Creates virtual elements of the CPU, RAM, and
hard disk.
Virtualization - By Pete Winslow et al., Carnegie Mellon
History
7
Introduction to
Virtualization
1
Outline
• Goals
• Understanding the benefits of virtualization in IT
industry and how to virtualize HW resources
• Schedule
• Introduction to virtualization
• OS vs. VMM
• CPU virtualization and scheduling
• Memory virtualization and management
• I/O virtualization
• Live VM migration
• Introduction to Systemtap
What is Virtualization?
• Multiple OSes on a single machine
• Giving an illusion that each OS is running on real HW
• Virtual Machine Monitor (VMM)
• Another layer of kernel to virtualize multiple OSes
• Also called “hypervisor”
• An OS as a supervisor is no more HW-dictator!
App App
App App App App App App
Windows Linux Mac
Virtual Machine Monitor
Hardware
History – Born and Died (1/4)
• 1960s-1970s
• High cost of computing machines
• IBM VM/370: A VMM for IBM mainframe
Powerful &
expensive
hardware
• 1980s-1990s
• But, lost attentions since PC era (1980s)
• Cheap HW No need to share hardware
• CPU did not support virtualization well
• High engineering cost and overhead
History - Reborn (2/4)
• The late 1990s
• Regain attention for “server consolidation”
• Toward cost-effective large-scale computing
• Stanford’s research project: Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors [SOSP’97]
• They founded VMware in 1998
History - Renaissance (3/4)
• 1998-2002
• VMware
• “Full-virtualization”
• Running unmodified OS
• Starting with SW-based binary translation
• Success in industry and academia
• VMware‘s state-of-the-art techniques in SOSP and OSDI
• 2003
• Xen
• University of Cambridge’s project: Open source!!!
• “Xen and Art of Virtualization” [SOSP’03]
• “Para-virtualization”
• Modified OS for near-native performance: Linux on x86
• 2003-
• Virtualization research renaissance based on Xen
• 2007: Acquired by Citrix
History - Ubiquitous (4/4)
• 2005-2006
• HW-assisted virtualization
• x86 virtualization
• Intel VT-x & AMD-V
• Running unmodified OS with near-native performance
• Default functionality now
• 2006-now
• Cloud computing
• Infrastructure-as-a-Service (IaaS)
• Virtual desktop infrastructure (VDI)
• Mobile virtualization
• ARM virtualization technology (Cortex-A15)
Why Virtualization? (1/6)
• Efficient resource utilization
• Low resource utilization of each server machine
• Low total cost of ownership (TCO)
• Low cost of infrastructure and energy
Average CPU utilization of 5000+ Google’sservers
VM
VM
Mostly 0-50% utilization
VMM
CPU
CPU
CPU
VM
CPU
The Case for Energy-Proportional Computing [IEEE Computer’07]
Why Virtualization? (2/6)
• Flexible VM relocation
• “Live VM migration”
• Flexible VM relocation with near-zero downtime
• Flexible load balancing
• Relieving resource bottleneck
VM
VM
VM
CPU
CPU
CPU
Why Virtualization? (3/6)
• Flexible VM relocation
• “Live VM migration”
• Flexible VM relocation with near-zero downtime
• High availability
VM
SW or HW maintenance
(upgrade or fix)
Why Virtualization? (4/6)
• Strong isolation
• Strong isolation between co-located VMs
• Fault containment or isolation Safe
• Safe
OSes, especially drivers, are from bugs
error-prone and
App
malicious
App
attacks VM VM
OS OS
OS VMM
Hardware Hardware
VMM is much smaller than OS
Low trusted computing base (TCB)
An empirical study of operating systems errors [SOSP’01]
Why Virtualization? (5/6)
• Multiple OSes on a single device
• OS dependency of legacy SW
• Linux + Windows, Android + iOS
• Different requirements of SW
• Virtualization for embedded or mobile systems
• RTOS + GPOS
• Building secure systems
• Security-enhanced OS + GPOS
Trusted VMM
Terra: A Virtual Machine-Based Platform for Trusted Computing [SOSP’03]
Why Virtualization? (6/6)
• Other benefits
• Strong security monitoring
• Security monitoring outside OSes
• Ease of deployment
• Virtual appliance
• A bundle of OS and applications
• Flexible testing and debugging
• Building distributed environments on a single machine
• Kernel development and debugging
• VM-based recording and replaying
Use Cases
• Cloud computing
• Virtual desktop infrastructure
• Mobile virtualization
Virtualization & Cloud Computing
• VM-based resource pool for various demands
• Infrastructure-as-a-Service (IaaS)
Virtualization & Cloud Computing
• Many providers use commercial & open-source
VMMs
Virtualization Solutions Cloud Providers
Virtual Desktop Infrastructure (VDI)
• Desktop provisioning
Dedicated workstations VM-based shared environments
VM
VM
VM
VM VM
- Energy wastage by idle desktops
- Resource underutilization
+ Energy savings by consolidation
- High management cost
+ High resource utilization
- High maintenance cost
+ Low management cost
- Low level of security
(flexible HW/SW provisioning)
+ Low maintenance cost
(dynamic HW/SW upgrade)
+ High level of security
(centralized data containment)
Virtual Desktop Infrastructure (VDI)
• VMware VDI
• Pioneer of VDI
Mobile Virtualization
• Trends of consumer electronics
• Digital convergence
• What do consumer electronics(CE) devices want to achieve?
Reliability Extensibility
Trustworthiness for primary functions Flexibility for adding features as needed
Business
Phone
Personal
Phone
Mobile Virtualization
• Embracing all apps in a unified market
• iOS + Android + Windows
• Technically possible, but not yet by industry
• Currently, not much attractive.
• Multiple Androids
• Android + RTOS
• Issues
• Performance, performance, performance…
• Graphics acceleration Challenging
• CPU, memory limitation
• High-end smartphones can resolve this limitation
Basic Terminologies
• Types of VMMs
• Type-1 vs. Type-2
• Virtualization methods
• Full-virtualization vs. Para-virtualization
Type-1 vs. Type-2
• Depending on what sits right on HW
Type-1: VMM on HW Type-2: Host OS on HW
Guest VM Guest VM Host OS Guest VM Guest VM
Guest OS Guest OS
Guest OS Guest OS
VMM
VMM
HW HW
• Xen, VMware ESX server, Hyper-V • KVM, VMware Workstation, VirtualBox
• Mostly for server, but not limited • Mostly for client devices, but not limited
• VMM by default • VMM on demand
• OS-independent VMM • OS-dependent VMM
Xen: Type-1 VMM
• Type-1 VMM
• Para-virtualization and full-virtualization
• Domain0
• Privileged VM for guest VM (domainU) management
• Handling I/O operations requested from domainUs
• Including native device drivers to directly access HW
Domain0 DomainU DomainU
(Privileged VM) (Guest VM) Guest VM
Linux Guest OS Guest OS
Xen VMM
KVM: Type-2 VMM
• Type-2 VMM for Linux as a host OS
• Based on HW-assisted virtualization
• Linux kernel mainline (2.6.20~)
QEMU Guest VM Linux Process
Host OS
(Linux) I/O
emulation
Guest OS
Linux vCPU vCPU
User space Thread Linux Thread Linux Thread
Kernel space KVM VMM (kernel module)
Full- vs. Para-virtualization
• Depending on whether OS source is modified
• Full-virtualization = No OS source modification
• SW-based full virtualization
• Emulation
• HW-based full virtualization
• HW-assisted virtualization
• Para-virtualization = OS source modification
• Virtualization-aware OS
• Bridging semantic gap between VMM and OS
• Mostly for performance
Today’s virtualization solutions adopt both approaches
for optimized performance
Hardware enabled virtualization
the virtual machine has its own hardware and allows a
guest OS to be run in isolation.
Intel VT (IVT)
AMD virtualization (AMD-V)
Examples:
VMware Fusion
Parallels Desktop for Mac
Parallels Workstation
Operating system-level virtualization
virtualizing a physical server at the operating system level,
enabling multiple isolated and secure virtualized servers to
run on a single physical server.
Examples:
Parallels Workstation
Linux-VServer, Virtuozzo
OpenVZ, Solaris Containers
FreeBSD Jails
Chroot ?
Application Virtualization
typically for the purpose allowing application binaries to be
portably run on many different computer architectures
and operating systems.
http://en.wikipedia.org/wiki/Comparison_of_Application_Vi
rtual_Machines
Examples:
.NET CLR
JVM
Script Languages:Python,Ruby,Javascript...
Resource Virtualization
LVM
SAN
VPN/NAT
Multiprocessor and multi-core
Cluster and Grid computing
Partitioning
Virtualization Under Linux(1)
UML (User Mode Linux)
http://user-mode-
linux.sourceforge.net/
KVM (Kernal-based Virtual Machine)
From Linux-2.6.20
http://kvm.qumranet.com/kvmwiki
XEN
http://xen.xensource.com/
Virtualization Under Linux(2)
QEMU
http://fabrice.bellard.free.fr/qemu/
QEMU Accelerators
KQEMU
QVM86
VirtualBox (released in January 2007)
KVM with QEMU
Virtualization Under Linux(3)
Bochs (GPLed, very slow)
A portable x86 and AMD64 PCs emulator mostly written in C++ and
distributed as free software under GPL.
http://bochs.sourceforge.net/
VirtualBox(commercial&open source, fast)
http://www.virtualbox.org/
VMWare (Workstation,Server,Player)
Virtualization Under Linux(4)
SWSOFT Virtualizations
http://www.swsoft.com
http://www.parallels.com/
http://openvz.org/
Linux-VServer
http://linux-vserver.org/
Compare with:
FreeBSD Jail
Solaris Containers (Zones)
Linux Virtualization in Windows(1)
VMWare
Virtual PC
VirtualBox
Bochs
QEMU