Virtualization Student Notes
Virtualization Student Notes
• Overview
• History
• Benefits and Features
• Building Blocks
• Types of Virtual Machines and Their Implementations
• Virtualization and Operating-System Components
• Examples
Chapter Objectives
Also suffers from oversubscription -> requires extra management efficiency from
VMM
For example, VMware ESX guests have a configured amount of physical memory,
then ESX uses 3 methods of memory management
1. Double-paging, in which the guest page table indicates a page is in a
physical frame but the VMM moves some of those pages to backing store
2. Install a pseudo-device driver in each guest (it looks like a device driver to
the guest kernel but really just adds kernel-mode code to the guest)
Balloon memory manager communicates with VMM and is told to
allocate or deallocate memory to decrease or increase physical
memory use of guest, causing guest OS to free or have more memory
available
3. Deduplication by VMM determining if same page loaded more than once,
memory mapping the same page into multiple guests
OS Component – I/O
Easier for VMMs to integrate with guests because I/O has lots of
variation
Already somewhat segregated / flexible via device drivers
VMM can provide new devices and device drivers
But overall I/O is complicated for VMMs
Many short paths for I/O in standard OSes for improved performance
Less hypervisor needs to do for I/O for guests, the better
Possibilities include direct device access, DMA pass-through, direct interrupt
delivery
Again, HW support needed for these
Networking also complex as VMM and guests all need network
access
VMM can bridge guest to network (allowing direct access)
And / or provide network address translation (NAT)
NAT address local to machine on which guest is running, VMM provides address
translation to guest to hide its address
OS Component – Storage Management
• Both boot disk and general data access need be provided by VMM
• Need to support potentially dozens of guests per VMM (so standard
disk partitioning not sufficient)
• Type 1 – storage guest root disks and config information within file
system provided by VMM as a disk image
• Type 2 – store as files in file system provided by host OS
• Duplicate file -> create new guest
• Move file to another system -> move guest
• Physical-to-virtual (P-to-V) convert native disk blocks into VMM
format
• Virtual-to-physical (V-to-P) convert from virtual format to native or
disk format
• VMM also needs to provide access to network attached storage
(just networking) and other disk images, disk partitions, disks, etc
OS Component – Live Migration
• Taking advantage of VMM features leads to new functionality not found on general
operating systems such as live migration
• Running guest can be moved between systems, without interrupting user access to the
guest or its apps
• Very useful for resource management, maintenance downtime windows, etc
1.The source VMM establishes a connection with the target VMM
2.The target creates a new guest by creating a new VCPU, etc
3.The source sends all read-only guest memory pages to the target
4.The source sends all read-write pages to the target, marking them as clean
5.The source repeats step 4, as during that step some pages were probably modified
by the guest and are now dirty
6.When cycle of steps 4 and 5 becomes very short, source VMM freezes guest, sends
VCPU’s final state, sends other state details, sends final dirty pages, and tells target
to start running the guest
• Once target acknowledges that guest running, source terminates guest
Live Migration of Guest Between Servers
Examples - VMware