Chapter2 P2
Chapter2 P2
Virtualization
Contents
Virtualization.
Layering and virtualization.
Virtual machine monitor.
Virtual machine.
Performance and security isolation.
Architectural support for virtualization.
x86 support for virtualization.
Full and paravirtualization.
Xen 1.0 and Xen 2.0.
Performance comparison of virtual machine monitors.
The darker side of virtualization.
Software fault isolation.
Libraries.
Applications.
API
Libraries A2
ABI
System calls
Operating System A3
ISA
System ISA User ISA
Hardware
Intermediate Portable
code code
VM compiler/ VM compiler/
Loader
interpreter interpreter
A VMM allows
Multiple services to share the same platform.
Live migration - the movement of a server from one platform to
another.
System modification while maintaining backward compatibility
with the original system.
Enforces isolation among the systems, thus security.
Application Application
Binary
optimizers HLL VMs
Hybrid VM
Codesigned VM-1 VM-n
VM
Hardware
(a) (b)
Application Application
Application
Guest OS -1 Guest OS -n
Application
Application
Application
VM-1 VM-n
Guest OS
Virtual Machine Monitor
Hardware Hardware
(c) (d)
Guest OS Guest OS
Hardware Hardware
abstraction abstraction
layer layer
Hypervisor Hypervisor
Hardware Hardware
(a) (b)
Xen
Domain0 control Virtual x86 Virtual physical Virtual block
interface Virtual network
CPU memory devices
X86 hardware
Bridge
Frontend
Backend
Network
interface
Event channel
XEN
NIC
(a)
Request queue
Outstanding Unused
descriptors descriptors
Consumer Response
Producer Response
(private pointer maintained by
(shared pointer updated
Response queue the guest OS)
by Xen)
(b)
Xen zero-copy semantics for data transfer using I/O rings. (a) The communication
between a guest domain and the driver domain over an I/O and an event channel;
NIC is the Network Interface Controller. (b) the circular ring of buffers.
Cloud Computing: Theory and Practice.
Dan C. Marinescu Chapter 5 31
Xen 2.0
Optimization of:
Virtual interface - takes advantage of the capabilities of some
physical NICs, such as checksum offload.
I/O channel - rather than copying a data buffer holding a packet,
each packet is allocated in a new page and then the physical
page containing the packet is re-mapped into the target domain.
Virtual memory - takes advantage of the superpage and global
page mapping hardware on Pentium and Pentium Pro
processors. A superpage entry covers 1,024 pages of physical
memory and the address translation mechanism maps a set of
contiguous pages to a set of contiguous physical pages. This
helps reduce the number of TLB misses.
Bridge Bridge
Offload
I/O
Driver I/O
channel channel High Level
NIC Backend Virtual NIC Backend Virtual
Driver Interface Interface Driver Interface
Interface
(a) (b)
(a)
(b)
(c)
The setup for the performance comparison of a native Linux system with OpenVZ, and
the Xen systems. The applications are a web server and a MySQL database server. (a)
The first experiment, the web and the DB, share a single system; (b) The second
experiment, the web and the DB, run on two different systems; (c) The third experiment,
the web and the DB, run on two different systems and each has four instances.
Application
Malicious Guest OS
OS
Operating
Malicious system (OS)
OS Virtual machine monitor
Hardware Hardware
(a) (b)
The insertion of a Virtual-Machine Based Rootkit (VMBR) as the lowest
layer of the software stack running on the physical hardware; (a) below an
operating system; (b) below a legitimate virtual machine monitor. The
VMBR enables a malicious OS to run surreptitiously and makes it invisible
to the genuine or the guest OS and to the application.