2. Six Reasons Businesses NeedVirtualization
Increase Server Efficiency
Improves Disaster recovery Efforts
Increase Business Continuity
Test Security updates and Patches
Move to desktop virtualization
5. DEFINITION
In computing, virtualization refers to the act of creating
a virtual (rather than actual) version of something,
including virtual computer hardware platforms, operating
systems, storage devices, and computer network resources
A layer mapping its visible interface and resources onto
the interface and resources of the underlying layer or
system on which it is implemented
7. Virtualization contd.
◦ Purposes
Abstraction – to simplify the use of the underlying resource
(e.g., by removing details of the resource’s structure)
Replication – to create multiple instances of the resource (e.g.,
to simplify management or allocation)
Isolation – to separate the uses which clients make of the
underlying resources (e.g., to improve security)
8. Virtual Machine Monitor (VMM)
VMM
Virtual Machine
Guest OS
Application
Virtual Machine
Guest OS
Application
Virtual Machine
Guest OS
Application
Real
Machine
◦ A virtualization system that partitions a single physical “machine” into multiple
virtual machines.
◦ Terminology
Host – the machine and/or software on which theVMM is
implemented
Guest – the OS which executes under the control of theVMM
10. Benefits and Advantages ofVirtualization
Resource Utilization
Reducing Hardware Costs
Maintenance
Multiple Systems
System Security
Test Environment
11. Architecture & Interfaces
Architecture: formal specification of a system’s interface and the logical
behavior of its visible resources.
Hardware
System ISA User ISA
Operating
System
System Calls
Libraries
Applications
ISA
ABI
API
API – application Programming interface
ABI – application binary interface
ISA – instruction set architecture
13. Instruction Set Architecture Level
At the ISA level, virtualization is performed by
emulating a given ISA by the ISA of the host
machine
Guest OS gives instructions to emulator and it
translates to native instructions set which
executes on host machine
Types of Instructions
Processor oriented instructions
I/O instructions
14. Hardware Abstraction Level
this approach generates a virtual hardware
environment for aVM
HAL is included in form of device drivers
The idea is to virtualize a computer's
resources, such as its processors, memory,
and I/O devices
15. Operating System Level
Virtualization layer replicates OS installed on
Physical machine to createVirtual environment
for the application by partitioning for each virtual
machine
Application will not come to know about
separation
OS-level virtualization creates isolated containers
on a single physical server and the OS instances
to utilize the hard-ware and software in data
centers
The containers behave like real servers
16. Library Support Level(API level)
Virtualization with library interfaces is
possible by controlling the communication
link between applications and the rest of a
system through API hooks.
The software tool WINE has implemented
this approach to support Windows
applications on top of UNIX hosts
17. User-Application Level
Application works simply like a block of instructions
Set of instructions are machine specific can be used by application
level virtualization
Microsoft .NET CLR and JavaVirtual Machine (JVM) are two good
examples
MSIL to native code
21. Hosted Hypervisor(Type 2)
Run guest OS on top of Host OS
Performance of hosted system may be
downgraded , due to I/O requests passed
through host OS
Host OS has full control over scheduling
and other task of its applications and the
VMM
. VMwareWorkstation, VMware
Player, OracleVirtualBox
22. Bare-Metal Hypervisor(Type 1)
VMM is installed above it which can directly
communicate with hardware used by base OS
These hypervisors run directly on the host's
hardware to control the hardware manages guest
operating systems.
For this reason, they are sometimes called bare
metal hypervisors.
The first hypervisors, which IBM developed in the
1960s, were native hypervisors
OracleVM Server for SPARC, OracleVM Server for
x86, the Citrix XenServer, Microsoft Hyper-V,
and VMware ESX/ESXi.
23. KVM
Kernel-basedVirtual Machine (KVM) is
a virtualization infrastructure for the Linux
kernel that turns it into a hypervisor KVM
requires a processor with hardware
virtualization extension
24. Xen
is a hypervisor using a microkernel design, providing services that
allow multiple computer operating systems to execute on the
same computer hardware concurrently.
Xen is a hypervisor that supports x86, x86_64, Itanium, and ARM
architectures, and can run Linux,Windows, Solaris, and some of
the BSDs as guests on their supported CPU architectures.
Xen can do full virtualization on systems that support
virtualization extensions, but can also work as a hypervisor on
machines that don't have the virtualization extensions
The University of Cambridge Computer Laboratory developed
the first versions of Xen
Xen supports a form of virtualization known as para virtualization,
in which guests run a modified operating system
25. Difference between Xen and KVM
XEN KVM
hypervisor Type-1 Type-2
form ParaVirtualization FullVirtualization
Technology Open source(Citrix) Open source
origin originated in a 2003 Cambridge
University research project
introduced into the
Linux kernel in February
2007,
Emulator Dom0 QEMU
26. System-level Design Approaches
Full virtualization (direct execution)
◦ Exact hardware exposed to OS
◦ Efficient execution
◦ OS runs unchanged
◦ Requires a “virtualizable” architecture
◦ Example: VMWare
Paravirtualization
OS modified to execute under VMM
Requires porting OS code
Necessary for some (popular)
architectures (e.g., x86)
Examples: Xen, Denali
28. Hardware assistVirtualization
Binary Translation uses dynamic modification which causes
performance degradation
This is the new approach that avoids in the system state and calls the
VMM directly
Namely Intel-VT and AMD-V use this technology
Hardware assistedVMMs interrupt the execution ofVM code only
when it is extremely necessary
29. ParaVirtualization
System virtualization method which makes OS aware that it is
being virtualized
OS calls underlyingVMM automatically
Calling the hypervisor from the OS known as Hypercalls
Modification in the source code improves the virtual system
performance greatly
30. KVM
Aim-:Virtualization using KVM Hypervisor
1) Check whether CPU has hardware virtualization support.
KVM only works if your CPU has hardware virtualization support – either IntelVT-x or AMD-V.To determine whether your CP
includes these features, run the following command:
#sudo grep -c "svm|vmx" /proc/cpuinfo
A 0 indicates that your CPU doesn’t support hardware virtualization, while a 1 or more indicates that it does.
# sudo kvm-ok
2)Install KVM and supporting packages.
Virt-Manager is a graphical application for managing your virtual machines.you can use the kvm command directly, but libvirt and
Virt-Manager simplify the process.
#sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
3) Create User.
Only the root user and users in the libvirtd group have permission to use KVM virtual machines. Run the following command to
add your user account to the libvirtd group:
#sudo add user ubuntu
#sudo add user ubuntu libvirtd
After running this command, log out and log back in as bvcoe
4) Check whether everything is working correctly.
Run following command after logging back in as bvcoe and you should see an empty list of virtual machines.
This indicates that everything is working correctly.
#sudo virsh list --all
#virsh -c qemu:///system list
5)OpenVirtual Machine Manager application and CreateVirtual Machine