28
WELCOME

Virtualization

Embed Size (px)

Citation preview

Page 1: Virtualization

WELCOME

Page 2: Virtualization

VIRTUALIZATION

Seminar Presented By:

Vishnu Ramakrishnan

Page 3: Virtualization

The Modern Age of Computers

Page 4: Virtualization

Problems in current Scenario

The data-centres are: Full of under-utilized servers.

Complicate in management.

Power consumption Greater wattage per unit area than ever.

Electricity overloaded.

Cooling at capacity.

Environmental problem

Page 5: Virtualization

What is Virtualization

Virtualization -- the abstraction of computer resources.

Defenition : virtualization is a framework or methodology of dividing the resources of a computer into multiple execution environments, by applying one or more concepts or technologies such as hardware and software partitioning, time-sharing, partial or complete machine simulation, emulation, and quality of service.

Virtualization hides the physical characteristics of computing resources from their users, be they applications, or end users.

This includes making a single physical resource (such as a server, an operating system, an application, or storage device) appear to function as multiple virtual resources; it can also include making multiple physical resources (such as storage devices or servers) appear as a single virtual resource.

Page 6: Virtualization

Normal Computer System

Hardware

OperatingSystem

Applications

Page 7: Virtualization

Virtualization - One Server for Multiple Applications/OS

Hardware

OperatingSystem

Applications

Hardware

OperatingSystem

Application

Hypervisor

OperatingSystem

Application

OperatingSystem

Application

OperatingSystem

Application

OperatingSystem

Applications

Hypervisor is a software program that manages multiple operating systems (or multiple instances of the same operating system) on a single computer system. The hypervisor manages the system's processor, memory, and other resources to allocate what each operating system requires. Hypervisors are designed for a particular processor architecture and may also be called virtualization managers.

Page 8: Virtualization

CPU Capacity Utilization

Page 9: Virtualization

Why Virtualization

Virtual machines can be used to consolidate the workloads of several under-utilized servers to fewer machines, perhaps a single machine. Related benefits are savings on hardware, environmental costs, management, and administration of the server infrastructure.

Virtual machines can be used to provide secure, isolated sandboxes for running untrusted applications. Virtualization is an important concept in building secure computing platforms.

Virtual machines can provide the illusion of hardware, or hardware configuration that you do not have (such as multiple processors). Virtualization can also be used to simulate networks of independent computers.

Virtual machines can be used to run multiple operating systems simultaneously: different versions, or even entirely different systems, which can be on hot standby. Some such systems may be hard or impossible to run on newer real hardware.

Page 10: Virtualization

Why Virtualization Virtual machines allow for powerful debugging and performance monitoring. You

can put such tools in the virtual machine monitor, for example. Operating systems can be debugged without losing productivity, or setting up more complicated debugging scenarios.

Virtual machines can isolate what they run, so they provide fault and error containment. You can inject faults proactively into software to study its subsequent behavior.

Virtual machines are great tools for research and academic experiments. Since they provide isolation, they are safer to work with. They encapsulate the entire state of a running system: you can save the state, examine it, modify it, reload it, and so on. The state also provides an abstraction of the workload being run.

Virtualization can enable existing operating systems to run on shared memory multiprocessors.

Virtual machines can be used to create arbitrary test scenarios, and can lead to effective quality assurance.

And plenty of other reasons……

Page 11: Virtualization

Types of Virtualization Memory virtualization Desktop virtualization Platform virtualization (Close to Cloud Computing)

Full virtualization Paravirtualization Hardware-assisted virtualization Partial virtualization OS-level virtualization Hosted environment (e.g. User-mode Linux)

Storage virtualization Network virtualization Application virtualization

Cross-platform virtualization Emulation or simulation Hosted Virtual Desktop

Page 12: Virtualization

Full Virtualization

Virtualization technique used to provide a complete simulation of the underlying hardware, in the Virtual machine.

One machine is accessed and manipulated by more than one users or OS’s.

All software (including all OS’s) capable of execution on the raw hardware can be run in the virtual machine.

Full virtualization has proven highly successful in cases when Sharing a computer system among multiple users, Isolating users from each other (and from the control program), and Emulating new hardware to achieve improved reliability, security and

productivity.

Page 13: Virtualization

Full Virtualization

example of full virtualization was that provided by the control program of IBM's CP/CMS operating system. Each CP/CMS user was provided a simulated, stand-alone computer.

Each such virtual machine had the complete capabilities of the underlying machine, and (for its user) the virtual machine was indistinguishable from a private system.

Page 14: Virtualization

Full Virtualization - Requirements

Equivalence: a program running under the VMM should exhibit a behavior essentially identical to that demonstrated when running on an equivalent machine directly.

Resource control (safety): the VMM must be in complete control of the virtualized resources.

Efficiency: a majority of the machine instructions must be executed without VMM intervention.

Page 15: Virtualization

Full Virtualization - Challenges

Interception and Simulation of privileged operations -- I/O instructions

The effects of every operation performed within a given virtual machine must be kept within that virtual machine – virtual operations cannot be allowed to alter the state of any other virtual machine, the control program, or the hardware.

Some machine instructions can be executed directly by the hardware, E.g., memory locations and arithmetic registers.

Other instructions that would "pierce the virtual machine" cannot be allowed to execute directly; they must instead be trapped and simulated. Such instructions either access or affect state information that is outside the virtual machine.

Some hardware is not easy to be used for full virtualization, e.g., x86

Page 16: Virtualization

Challenges of x86 Hardware Virtualization

The x86 architecture offers four levels of privilege known as Ring 0, 1, 2 and 3 to operating systems and applications to manage access to the computer hardware.

Virtualizing the x86 architecture requires placing a virtualization layer under the OS (which expects to be in the most privileged Ring 0) to create and manage the virtual machines that deliver shared resources.

Solutions are :

> Binary translation (Eg: VMWare)

> OS assisted virtualization or paravirtualization.

> Hardware assisted virtualization

Page 17: Virtualization

Kernel code of non-virtualizable instructions are translated to replace with new sequences of instructions that have the intended effect on the virtual hardware.

Each virtual machine monitor provides each Virtual Machine with all the services of the physical system, including a virtual BIOS, virtual devices and virtualized memory management.

This combination of binary translation and direct execution provides Full Virtualization as the guest OS is fully abstracted from the underlying hardware by the virtualization layer.

The guest OS is not aware it is being virtualized and requires no modification.

The hypervisor translates all operating system instructions on the fly and caches the results for future use, while user level instructions run unmodified at native speed.

Examples VMware

Microsoft Virtual Server

Binary Translation

Page 18: Virtualization

Paravirtualization (OS Assisted) Paravirtualization – via a modified OS kernel as

guest OS Paravirtualization involves modifying the OS kernel to

replace non-virtualizable instructions with hypercalls that communicate directly with the virtualization layer hypervisor.

The hypervisor also provides hypercall interfaces for other critical kernel operations such as memory management, interrupt handling and time keeping.

Paravirtualization is different from full virtualization, where the unmodified OS does not know it is virtualized and sensitive OS calls are trapped using binary translation.

It is very difficult to build the more sophisticated binary translation support necessary for full virtualization, modifying the guest OS to enable paravirtualization is relatively easy.

Paravirtualization cannot support unmodified OS

Example: Xen -- modified Linux kernel and a version of Windows XP

Hardware

ParavirtualizedGuest OS

Application

Ring 2

Ring 1

Ring 0

Ring 3

Direct Execution of user and OSRequests

Hypercalls to the Virtualization Layer replace non-virtualiable OS instructions

Virtualization layer

Page 19: Virtualization

Hardware vendors are rapidly embracing virtualization and developing new features to simplify virtualization techniques.

First generation enhancements target privileged instructions with a new CPU execution mode feature that allows the VMM to run in a new root mode below ring 0.

Privileged and sensitive calls are set to automatically trap to the hypervisor, removing the need for either binary translation or paravirtualization.

Due to high hypervisor to guest transition overhead and a rigid programming model, binary translation approach currently outperforms hardware assist implementations.

Hardware-Assisted Virtualization

Hardware

Guest OS

Application

Ring 2

Ring 1

Ring 0

Ring 3

Direct Execution of user and OSRequests

OS requests trapsto VMM withoutbinary translationor paravirtualization

VMM

Non-rootMode

PrivilegeLevels

Root ModePrivilegeLevels

Page 20: Virtualization

OS-level Virtualization OS-level virtualization – Server Virtualization

method. kernel of an OS allows for multiple isolated

user-space instances, instead of just one. Each OS instance(or Container) looks and

feels like a real server to each user. This method virtualizes servers on the operating

system (kernel) layer. This creates isolated containers on a single physical server and OS instance to utilize hardware, software, data center and management efforts with maximum efficiency.

Virtual hosting environments commonly use operating system–level virtualization, where it is useful for securely allocating finite hardware resources amongst a large number of mutually-distrusting users.

Hardware

OS Container 1

OS-Level Virtualization

StandardHost OS

OS virtualization layer

OS Container 2

OS Container 3

Page 21: Virtualization

Application Virtualization Software technology that encapsulates application software from the underlying

operating system.

A fully virtualized application is not actually installed in the traditional sense, although it is still executed as if it is installed (runtime virtualization).

Full application virtualization requires a virtualization layer. Application virtualization layers replace part of the runtime environment normally provided by the operating system. The layer intercepts all file and Registry operations of virtualized applications and transparently redirects them to a virtualized location.

Benefits :

Allows applications to run in environments that do not suit the native application (Eg: Wine).

Uses fewer resources than a separate virtual machine. Improve portability, manageability and compatibility of applications.

Improved security, by isolating applications from the operating system.

Reduces system integration and administration costs in an Organization.

Page 22: Virtualization

Memory Virtualization

Memory virtualization decouples random access memory (RAM) resources from individual systems in the data center, and then aggregates those resources into a virtualized memory pool available to any computer in the cluster.

The memory pool is accessed by the operating system or applications running on top of the operating system.

The distributed memory pool can then be utilized as a high-speed cache, a messaging layer, or a large, shared memory resource for a CPU or a GPU application.

Machine memory

Physical memory

Virtual memory

Process 1 Process 2

VM1

Process 1 Process 2

VM2

Benefits :

• Improves memory utilization via the sharing of scarce resources.

• Increases efficiency and decreases run time for data intensive and I/O bound applications

• Allows applications on multiple servers to share data without replication, decreasing total memory needs

• Lowers latency and provides faster access than other solutions.

Page 23: Virtualization

Device and I/O Virtualization

I/O virtualization environments are created by abstracting the upper layer protocols from the physical connections.

One physical adapter card appear as multiple virtual network interface cards (vNICs) and virtual host bus adapters.

In the physical view, virtual I/O replaces a server’s multiple I/O cables with a single cable that provides a shared transport for all network and storage connections.

Simplify management, lower costs and improve performance of servers in enterprise environments.

Benefits:

• Management agility: By abstracting upper layer protocols from physical connections, I/O virtualization provides greater flexibility, greater utilization and faster provisioning when compared to traditional architectures.

• Reduced cost: Virtual I/O lowers costs and enables simplified server management by using fewer cards, cables, and switch ports, while still achieving full network I/O performance.

• Reduced cabling: In a virtualized I/O environment, only one cable is needed to connect servers to both storage and network traffic. This can reduce data center cabling.

• Increased density: I/O virtualization increases the practical density of I/O by allowing more connections to exist within a given space.

Page 24: Virtualization

Popular Hypervisors Xen

> Developed by Xen Project Team in 2003.

> Runs on Linux, BSD, Solaris.

KVM

> Developed by OVA(Open Virtualization Alliance) and released in 2012.

> Supports many of Linux, BSD, Solaris, Windows, ReactOS, and AROS Research Operating System.

QEMU

> Open-Source, developed by QEMU Team.

> Runs on Linux, Windows, and some UNIX Platforms.

VirtualBox

> Developed by Oracle Corporation in 2007.

> Runs on Linux, Mac OS X, Windows(from XP), Solaris, and OpenSolaris

VMWare

> Developed by VMWare.inc in 1997

>Runs on Windows, Linux, Mac OS X

Page 25: Virtualization

To Sum up…

Virtualization provides the agility required to speed up IT operations, and reduces cost by increasing infrastructure utilization.

By minimizing user involvement, virtualization speeds up the process, reduces labor costs and reduces the possibility of human errors.

Binary translation is the most established technology for full virtualization.

Paravirtualization delivers performance benefits with maintenance costs.

Hardware assist is the future of virtualization, but it still has a long way to go.

Page 26: Virtualization

References

VMWare ® IBM ® Microsoft® Intel ® AMD ® http://www.xen.org/ http://en.wikipedia.org/ http://www.parallels.com/ http://www.webopedia.com/

Page 27: Virtualization

Any Questions…..??

Page 28: Virtualization

Thank You!