You are on page 1of 56

1.

Virtualization
Overview
What is virtualization?

・ Informally, a virtualized system (or subsystem) is a mapping of its


interface, and all resources visible through that interface, to the
interface and resources of a real system
・ Formally, virtualization involves the construction of an isomorphism
that maps a virtual guest system to a real host system (Popek and
Goldberg 1974)
The key to managing complexity in computer systems is their division
into levels of abstraction separated by well-defined interfaces
- Levels of abstraction allow implementation details at lower levels of a
design to be ignored or simplified

• Files are an abstraction of a Disk


• A level of abstraction provides a simplified interface to underlying resources

-2-
Virtualization and Abstraction

・ Virtualization uses abstraction but is different in that it doesn’t


necessarily hide details;
- The level of detail in a virtual system is often the same as that in
the underlying real system

• Virtualization provides a different interface and/or resources at the same level of abstraction

-3-
What is server virtualization?

Creating multiple logical server OS instances


on one physical piece of hardware

All HW drivers are virtualized – same virtual HW


regardless of physical HW

Each virtual machine is completely independent


of the others and doesn’t ‘realize’ it’s virtualized

-4-
Why virtualize?

More efficient HW utilization


More efficient staff
Long-term matching resources & needs
Quick and nimble server provisioning
Testing & Troubleshooting
More effective redundancy
HW maintenance w/o app downtime
Simplify system imaging
Disaster Recovery

-5-
HW Utilization Facts

Individual ebb and flow of resources

Cumulative usage of 28 servers in the MAIS data center


evaluated for virtualization:

44GB RAM, 138.15Ghz CPU, and 1323GB HD

45% of RAM not used 99.9% of time.

25% of RAM never used concurrently.

85% of CPU not used 99.9% of time.

81% of CPU never used concurrently.

68% of hard disk space unused


-6-
Hard Disk Utilization

Server Local Disk Total (GB) Used (GB) Free (GB)


SAN Manager 48 8 40
IIS app test 68 9 59
TNG Scheduling 68 13 55
PeopleSoft 8 HE 34 7 27
PeopleSoft 8 FIN 34 24 10
IIS / SQL:Research app 68 31 37
File Servers 136 56 80
Stat Version Control 34 6 28
Stat Version Control 17 6 11
SQL: eLearning dev 68 16 52
Hard Disk Utilization

Server Local Disk Total (GB) Used (GB) Free (GB)


IIS: eLearning dev 68 11 57
SQL: eLearning Prod 68 10 58
IIS: eLearning Prod 34 13 21
Machine Room environ 68 6 62
IIS document server 170 88 82
Domain Controller 34 7 27

More Efficient Hard Disk Utilization SAN in 30GB chunks


Total: 1323 GB 1 fiber channel >1 server
Used: 418 GB Virtual HDs more granular
Share free space – allocate as needed
Free: 905 GB(68% unused)
-8-
Virtualization Defined

Virtualization is a broad term that refers to the abstraction


of resources across many aspects of computing

For our purposes - One physical machine to support multiple


virtual machines that run in parallel

-9-
Problem Assessment – Why Virtualization?

Too many servers for too little work

Aging hardware reaching end of usable life

High infrastructure requirements

Limited flexibility in shared environments

-10-
2. Traditional server
The Traditional Server Concept

Web Server App Server DB Server EMail


Windows Linux Linux Windows
IIS Glassfish MySQL Exchange
-12-
And if something goes wrong ...

Web Server App Server DB Server EMail


Windows DOWN! Linux Windows
IIS MySQL Exchange
-13-
The Traditional Server Concept

System Administrators often talk about servers


as a whole unit that includes the hardware,
the OS, the storage, and the applications

Servers are often referred to by their


function i.e. the Exchange server, the SQL
server, the File server, etc

If the File server fills up, or the Exchange


server becomes overtaxed, then the System
Administrators must add in a new server
-14-
The Traditional Server Concept

Unless there are multiple servers, if a service


experiences a hardware failure, then the
service is down

System Admins can implement clusters of


servers to make them more fault tolerant.
However, even clusters have limits on their
scalability, and not all applications work in a
clustered environment

-15-
The Traditional Server Concept

Pros
Easy to conceptualize
Fairly easy to deploy
Easy to backup
Virtually any application/service can be run
from this type of setup
Cons
Expensive to acquire and maintain hardware
Not very scalable
Difficult to replicate
Redundancy is difficult to implement
Vulnerable to hardware outages
In many cases, processor is under-utilized -16-
3. Virtual server
The Virtual Server Concept

Virtualization Layer Virtualization Layer Virtualization Layer

Hardware platform Hardware platform Hardware platform Hardware platform Hardware platform

Virtual Machine Monitor (VMM) layer between Guest OS and hardware


-18-
Virtual Machine and Hypervisor

The concept of virtualization can be applied not only to subsystems


such as disks, but to an entire machine denoted as a virtual machine
(VM)
・ A VM is implemented by adding a layer of software to a real
machine so as to support the desired VM’s architecture

・ This layer of software is often referred to as virtual machine


monitor (VMM)
・ - Early VMMs are implemented in firmware
・ - Today, VMMs are often implemented as a co-designed firmware-
software layer, referred to as the hypervisor

-19-
Research into Virtualization

Reduce the number of physical machines


Isolate environments but share hardware
Make better use of existing capacity
Virtualize Network and SAN interfaces to
reduce infrastructure needs
Ultimately save on maintenance and leases

More options available today than ever before…

-20-
Virtualization Software

MS Virtual PC 2004 – workstation only


VMWare Workstation 5 – workstation only
MS Virtual Server 2005, Standard (4p)
MS Virtual Server 2005, Enterprise (32p)
VMWare GSX Server 3.1
VMWare ESX Server 2.5

-21-
More Software Options

Wide array of virtualization products now


available in the marketplace

Partnerships with Operating System vendors


(i.e. SuSE, RedHat, Sun) yield tighter
integration and better performance

-22-
Close-up*

* adapted from a diagram in VMware white paper, Virtualization Overview

Server Server
Clustering
1 2
Guest OS Guest OS
Service
Console

VMM (Virtual Machine Monitor)

x86 Architecture

Intercepts
hardware requests
-23-
The Virtual Server Concept

Virtual servers seek to encapsulate the server


software away from the hardware

This includes the OS, the applications,


and the storage for that server

Servers end up as mere files stored on a


physical box, or in enterprise storage

A virtual server can be serviced by one or


more hosts, and one host may house more
than one virtual server
-24-
The Virtual Server Concept

Virtual servers can still be referred to by their


function i.e. email server, database server, etc

If the environment is built correctly, virtual


servers will not be affected by the loss of
a host

Hosts may be removed and introduced almost


at will to accommodate maintenance

-25-
The Virtual Server Concept

Virtual servers can be scaled out easily


If the administrators find that the resources
supporting a virtual server are being taxed
too much, they can adjust the amount of
resources allocated to that virtual server
Server templates can be created in a virtual
environment to be used to create multiple,
identical virtual servers
Virtual servers themselves can be migrated
from host to host almost at will
-26-
The Virtual Server Concept

Pros Cons
Resource pooling Slightly harder to
Highly redundant conceptualize
Highly available Slightly more costly
Rapidly deploy new servers (must buy hardware, OS,
Easy to deploy Apps, and now the
Reconfigurable while services abstraction layer)
are running
Optimizes physical resources
by doing more with less
-27-
4. Virtualization
technology
Virtualization Status

Offerings from many companies


e.g. VMware, Microsoft, Sun, ...

Hardware support
Fits well with the move to 64 bit (very large
memories) multi-core (concurrency) processors

Intel VT (Virtualization Technology) provides


hardware to support the Virtual Machine
Monitor layer
Virtualization is now a well-established
technology
-29-
Objectives of Virtualization

user Logical Physical


Resource Resource

Standard Interface(I/O)

End user Server

Resource transparency Virt.


Layer
Applications
Disk

Open API for Service Access

SLA supported Resource


Web services Network
Provisioning
Scope of Virtualization

Server Partitioning, Hypervisor, I/O

Infra(Resource) Storage Controller/Block/Tape/File(System)

Network Virtual IP, 801.1Q(VLAN)

File Cluster/Hadoop File System


Virtualization Information
Data Data Integration, Data Grid

Transaction JVM load balancing

Workload Task (Computing) Grid

Presentation SBC (Server Based Computing)


Virtualization Components

Provisioning and Orchestration


Information Virtualization
Workload Virtualization
(distributed data, caching,
(dynamic scheduling)
replication federation, transformation)
System Virtualization
Storage Virtualization Network Virtualization
(workload
(virtual volume (virtual device &
management,
management) connectivity)
partitioning)
Web service foundation and Information Model
What is Hypervisor?

H/W virtualization techniques allowing OS termed guests,


to run concurrently on a host computer

Type 1 Hypervisor (Native or Bare Metal)

Run directly on the host’s H/W to control the H/W and


manage guest OS
Citrix XenServer, VMware ESX/ESXi, Microsoft Hyper-V
Type 2 Hypervisor (Hosted)

Hypervisor run within a conventional OS environment


Hypervisor level as a distinct second S/W level, guest OS run
at third level above the H/W
KVM, VirtualBox
-33-
Types of Hypervisor

Type1
Type2
native
hosted
(bare-metal)
-34-
Full virtualization

Uses VM to mediate between Guest OS and H/W


Fully virtualizes H/W, can support any type of OS with no configuration
Certain Instruction Sets must be handled and trapped by hypervisor
Low performance

Apps Apps

Guest Guest
Mgmt
OS OS

Hypervisor (VMM)

Hardware
-35-
Paravirtualization

Guest OS interacts with Hypervisor directly using Hypercall


OS must be reconfigured with the corresponding Hypervisor
Provides near native performance:
Full virtualization < Paravirtualization

Apps Apps

Modified Modified
Guest OS Guest OS
Mgmt

Hypervisor (VMM)

Hardware
-36-
Virtual Machines

A virtualization layer is interposed between


the hardware and the operating systems
Multiple operating systems can run on the
same hardware simultaneously
They can be the same o/s or different
Each is isolated from the others and unaware
of their existence
A Virtual Machine Monitor is needed to
accomplish this: The VMM or Hypervisor
The overhead must be reasonably small – this
has driven changes to chip design to support
virtualization
( Intel VT (codenamed Vanderpool) and AMD's
is referred to as AMD-V (codenamed Pacifica)
Hypervisor
Bare-Metal Hypervisor Hosted Hypervisor

APP APP APP APP


… …
OS OS OS OS

Hypervisor Hypervisor
Host OS
SMP Server
SMP Server
Hypervisor itself handles all resource Hypervisor uses HOST OS Functions
management functions Vmware Workstation
System zPR/SM™, z/VM Microsoft Virtual Server
POWER™ Hypervisor HP Integrity VM
Vmware ESX Server User Mode Linux
Xen Hypervisor
-38-
Virtualization Scenarios

Hardware Virtualization

Software Virtualization
Full Virtualization
Para-Virtualization

-39-
Para-Virtualization

• Traditional VMMs provide full-virtualization:


 The functionally provided is identical to the underlying physical
hardware
 The functionality is exposed to the VMs
 They allow unmodified guest OSs to execute on the VMs
 This might result in some performance degradation

• E.g., VMWare provides full virtualization

-40-
Full Virtualization

• Other types of VMMs provide para-virtualization:


 They provide a virtual hardware abstraction that is similar, but not
identical to the real hardware
 They modify the guest OS to cooperate with the VMM
 They result in lower overhead leading to better performance
 E.g., Xen provides both para-virtualization as well as full-virtualization

-41-
Core Technology

The Hypervisor: HW Virtualization

A computing layer which allows multiple


operating systems to run on a host
computer at the same time
Originally developed in the 1970s as part of
the IBM S/360

Many modern day variants from different


developers

-42-
The Hypervisor

Conceptual diagram of typical server


configuration without virtualization

-43-
The Hypervisor

The role of the Hypervisor in supporting


Guest Operating Systems on a single machine

-44-
Current Architecture

-45-
Virtualized Architecture

-46-
5. Docker Container
Agenda
• What is Docker?
– Docker vs. Virtual Machine
– History, Status, Run Platforms
– Hello World
• Images and Containers
• Volume Mounting, Port Publishing, Linking
• Around Docker, Docker Use Cases
• Hands-On Workshop
48
What is Docker?
Docker is an open-source project th
at automates the deployment of ap
plications inside software containers
, by providing an additional layer of
abstraction and automation of oper
ating system–level virtualization o
n Linux.
[Source: en.wikipedia.org]
49
Docker: Name
[www.docker.com]
docker [naut.]: der Dockarbeiter, der Hafenarbe
iter
Source: leo.org
• Provide a uniformed wrapper around a softwar
e package: «Build, Ship and Run Any App, Any
where» [www.docker.com]
– Similar to shipping containers: The container
is always the same, regardless of the content
s and thus fits on all trucks, cranes, ships, ...
50
Docker vs. Virtual Machine

Source: https://www.docker.com/whatisdocker/
51
Docker Technology
• libvirt: Platform Virtualization
• LXC (LinuX Containers): Multiple is
olated Linux systems (containers)
on a single host
• Layered File System

[Source: https://docs.docker.com/terms/layer/]
52
Docker History

• 2013-03: Releases as Open Source


• 2013-09: Red Hat collaboration (Fedora, RHEL,
OpenShift)
• 2014-03: 34th most starred GitHub project
• 2014-05: JAX Innovation Award (most innovativ
e open technology)

53
Docker Operation Env.

54
Why Docker?
• Lightweight Virtualization

Ship Manual Automated Boot


deployment deployment

Bare Metal Days Hours Minutes Minutes

Virtualization Minutes Minutes Seconds Less than


(VM) minutes

Lightweight seconds Minutes Seconds Seconds


Virtualization
(Docker)
55
Run Platforms
• Various Linux distributions (Ubuntu, Fedora, RHEL, Centos, openSUSE,,)
• Cloud (Amazon EC2, Google Compute Engine, Rackspace)
• Microsoft integrate Docker with Windows (Azure Platform)

56

You might also like