4ARCTIC
Virtualization Techniques
Chapter 2:
Server Virtualization
1
Chapter Content
▪ Sec 1: Server virtualization Basics
▪ Sec 2 : VM migration
▪ Sec 3 : Market solutions comparison
▪ Sec 4 : Workshop – installing, configuring and using Server
Virtualization solutions
2
Server Virtualization Basics
3
Definition of Server Virtualization
Definition:
▪ Server virtualization refers to a number of “virtual machines” that are created on one server, saving on processing
power, cost and space.
▪ Server virtualization inserts a layer of abstraction
between the physical server hardware and the software
that runs on the server allowing us to run multiple
guest computers on a single host computer with those
guest computers believing they are running on their own hardware
4
Benefits of server virtualization
▪ Server consolidation
▪ Isolation
▪ Encapsulation and mobility
▪ Enhanced disaster recovery
▪ Hardware independence
▪ Reduced cost
▪ Rapid deployment
5
Understanding hypervisors
▪ Definition: 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.
▪ It has two components
▪ Kernel: (OS services) responsible for process creation, file system management, process scheduling..
▪ Virtual Machine Monitor (VMM)
▪ It is responsible for creating the virtual environment on which the guest virtual machines operate.
▪ It supervises the guest systems and makes sure resources are allocated to the guests as
necessary.
6
Types of hypervisors
Type 1: Bare-Metal Hypervisor
▪ The Type 1 hypervisor is considered a native or bare metal hypervisor. This type of hypervisor is
the lowest level hypervisors, running directly on the host hardware
▪ It has direct access to HW resources and is responsible for allocation of all resources (disk,
memory, CPU, and peripherals) to its guests.
▪ Ex: Vmware ESX/ESXi, KVM, , Xen,
Citrix XenServer, MS Hyper-V, Oracle VM
7
Types of hypervisors (…)
Type 1: Bare-Metal Hypervisor (…)
Performance improvement because they are self-hosted with embedded OSs that are optimized for
virtualization.
The bare metal machine becomes dedicated for the unique purpose of being a hypervisor. They are
not able to provide other roles
Device driver inflexibility: Unlike OS, hypervisors do not have the ability to dynamically load device
drivers
8
Types of hypervisors (…)
Type 2: Hosted Hypervisor
▪ The Type 2 hypervisor requires a full host operating system in order to operate. That is to say that
it is installed on top of the host operating system : just as an application.
▪ It relies on operating system (OS) running on physical machine for device support and physical
resource management.
▪ Guest operating systems run within VMs above
the hypervisor. This type of virtualization is typically
referred to as hosted virtualization.
▪ Ex: VirtualBox, VmWare workstation
9
Types of hypervisors (…)
Type 2: Hosted Hypervisor (…)
It has fewer hardware/driver issues as the host operating system is responsible for interfacing with
the hardware.
Weak in reliability and security because they inherit the vulnerabilities of the user-controlled host
operating system.
VMs affected by the update process of the Host OS
10
Types of hypervisors (…)
11
Types of hypervisors (…)
Monolithic hypervisor (…)
Monolithic hypervisors do not need a controlling, or parent, operating system because all guest
operating systems interact directly with the underlying physical hardware of the host computer by
using hypervisor-aware device drivers.
Vendors of monolithic hypervisor platforms are dependent on manufacturers of hardware devices to
supply such drivers for their products. The result is that the number of devices that can be used in
virtualized operating system environments running on monolithic hypervisor platforms can be more
limited than when those same operating system environments are run directly on physical
computers.
12
Types of hypervisors (…)
MicroKernel hypervisor
▪ Microkernel hypervisors do not require hypervisor-aware device drivers because they have an
operating system acting as the root, or parent, partition. This parent partition then provides the
execution environment needed for device drivers to access the underlying physical hardware of
the host computer.
▪ The hypervisor intercepts I/O access and redirects
it to the parent partition for emulation
▪ Ex: MS Hyper_V
13
Types of hypervisors (…)
MicroKernel hypervisor (…)
Because microkernel hypervisors do not need hypervisor-aware drivers, they can immediately use
the wide range of existing drivers that are available from device manufacturers
The attack surface is minimized because foreign code is not loaded in the hypervisor.
The only downside of the microkernel design is that a special partition, the parent partition, is
required. This adds measurable (but usually minimal) overhead to your system because of the
communication between parent and child partitions that is required to allow the child partitions to
access the hardware through the parent.
14
VM Migration
15
Understanding VM files
▪ From a user’s perspective, a logical compute system
▪ Runs an operating system (OS) and application like a physical machine
▪ Contains virtual components such as CPU, RAM, disk, and NIC
▪ From a hypervisor’s perspective
▪ Virtual machine (VM) is a discrete set of files such as configuration file, virtual disk files, virtual BIOS file,
VM swap file, and log file
VM
16
Understanding VM files (…)
17
VM migration
▪ Definition : Virtual machine migration is the task of moving a running virtual machine from one
physical hardware environment to another, without disconnecting the client.
▪ Memory, storage, and network connectivity of the virtual machine are transferred from the original
guest machine to the destination.
18
Why VM migration is needed ?
▪ Load balancing :
Move VM to a less busy host, make use of newly added capacity
▪ Maintenance :
move VMs off a host before it is shut down
▪ Recovery from host failure :
Restart VM on a different host
19
VM Migration types
▪ Cold migration :
▪ It is necessary to turn off the VM to copy the state of its memory on the target host. It is used with
the dynamic load balancing policy when the host receives more requests than it can handle.
▪ Do not involve any fault during the migration of the memory. With the machine stopped, the services
will no longer be available and the memory will not be modified on the source host. The machine
once migrated can resume its activity in the same state as when it stopped
▪ When the VM is stopped, running services will no longer be available for the duration of the
migration. This obviously poses major problems for applications requiring high availability.
▪ Since the memory is transferred entirely to the target host, the cold migration causes a slowdown
across the entire cloud network. 21
VM Migration types (…)
▪ Live migration :
▪ The process of moving a running virtual machine or application between different physical machines
without disconnecting the client or application. Memory, storage, and network connectivity of the
virtual machine are transferred from the original guest machine to the destination.
▪ Two techniques for moving the virtual machine's memory state from the source to the destination
are pre-copy memory migration and post-copy memory migration.
22
VM memory migration techniques
▪ Pre-copy memory migration :
▪ Warm-up phase
▪ Copy memory content over network
▪ Keep copying dirty pages iteratively until some threshold
▪ Stop-and-copy phase
▪ Stop the source VM
▪ Copy remaining dirty pages
▪ Start the destination VM
23
VM memory migration techniques (…)
▪ Post-copy memory migration :
▪ Stop the source VM
▪ Copy a minimal subset of the execution state of the VM (CPU state, registers and, optionally, non-pageable
memory)
▪ Start the destination VM
▪ Copy the memory pages actively
24
VM memory migration techniques (…)
▪ Pros and cons
25
Market solution comparison
26
It’s your Turn
▪ Choose one hypervisor among the following:
▪ VMware ESXi,
▪ Microsoft Hyper-V,
▪ Citrix Xen,
▪ KVM.
▪ Prepare a 10 minutes professional presentation that covers the following topics (feel free to
add any other relevant topic!):
▪ History
▪ Architecture, Type?, technique?
▪ Features and key advantages
▪ Limitations
▪ Security issues
27