Xen an art of virtalization
Transcript of Xen an art of virtalization
-
8/8/2019 Xen an art of virtalization
1/23
Xen and the Art of Virtualization
P. Barham, et. al.
SOSP 2003
Presented by Jae-Wan Jang
-
8/8/2019 Xen an art of virtalization
2/23
2/23
VMM>Virtual Machine Monitor (VMM)
A software layer which provides virtualized comput ing
environment Not only monitoring VM but also providing and controll ing
environment
HostcomputerHostcomputer
VMM
-
8/8/2019 Xen an art of virtalization
3/23
3/23
Xen> Targets to x86 architecture
> Type I (Classical system VM)
>Allows direct execution
> Supports unmodified application binaries
> Supports full multi-application operating system
> Goal of Xen
Isolation & low overhead
-
8/8/2019 Xen an art of virtalization
4/23
4/23
VMM
Difficulties in x86 virtualization>Virtualizable?
All sensitive instructions should be privileged instructions
> x86 architecture has instructions which are sensitive butunprivileged
GuestOS
HardwareHardware
GuestOS
GuestOS
GuestOS
-
8/8/2019 Xen an art of virtalization
5/23
5/23
Para-virtualization
> Full virtualization overhead
Binary rewrite technique
Identical shadow version of various system states
> Para-virtualization Similar machine abstraction with small modifications (keeping
application-binary interfaces)
Requires guest operating system modifications
Promises better performance than full virtualization
-
8/8/2019 Xen an art of virtalization
6/23
6/23
Design details
> Overall architecture
> Hypercall & events
> CPU
> Memory
> I/O device
-
8/8/2019 Xen an art of virtalization
7/23
7/23
Overall architecture
Hardware(hostcomputer)
GuestOS
dom0 domU domU domU
XenoLinux
ControlPlane
Software
User
Software
User
Software
User
Software
XenoLinux XenoBSDXenoBSD
dom0
Control I/F Xen (hypervisor)
VirtualDevices
Virtual DevicesDriver
Virtual DevicesDriver
Virtual DevicesDriver
Virtual DevicesDriver
-
8/8/2019 Xen an art of virtalization
8/23
8/23
Hypercall & events
> Mechanisms for interaction between Xen and guest OS
> Hypercall
Synchronous calls from guest OS to Xen
Similar concept to system call between process andoperating system
Ex) Page table updates
> Events
Asynchronous notification from Xen to guest OS
Replaces device interrupt delivery
-
8/8/2019 Xen an art of virtalization
9/23
9/23
CPU
> Protection ring
Ring 0 : Xen VMM
Ring 1 : Guest OS
Ring 3 : User software
ring0
ring3
ring2
ring1 1. Executeprivileged
instructions
2. Generalprotection
fault
-
8/8/2019 Xen an art of virtalization
10/23
10/23
CPU
> Exception handling
Exceptions including memory faults and system traps
Every exception refers to Xens IDT (interrupt descriptortable)
Registering guest OS IDT w ith Xen
ring0
ring3
ring2
ring1
IDT of VMM
excep t i ons
IDT of Guest OS
IDT of Guest OS
CurrentlyrunningVM
-
8/8/2019 Xen an art of virtalization
11/23
11/23
CPU
>VM scheduling
Borrowed virtual time (BVT) scheduling algorithm
5 ms time slice used
> Time & Timer
Real t ime TCP/ IP t imeout
Virtual time Scheduling
Alarm t imer for real time and virtual time
Xen
GuestOS
-
8/8/2019 Xen an art of virtalization
12/23
12/23
Memory
> Kinds of address
Virtualaddress
Physicaladdress
Machineaddress
VM
Host
0
256MB
128MB
384MB
-
8/8/2019 Xen an art of virtalization
13/23
13/23
Memory
> MMU virtualization : Shadow-mode vs. direct-mode
Virtual Physical
Virtual Machine
MMU
Guest OS
VMM
Hardware
Virtual Machine
-
8/8/2019 Xen an art of virtalization
14/23
14/23
Memory
> Direct-Mode Xen MMU virtualization
Virtual Machine
GuestreadGuestwrite
Validation Access&dirtybits
-
8/8/2019 Xen an art of virtalization
15/23
15/23
Memory
> Memory map
ring3
Kernel
User
4GB
3GB
0GB
XenSS
U ring
1
rin
g
0
-
8/8/2019 Xen an art of virtalization
16/23
16/23
I/ O device virtualization
> I/O rings
For efficient data transfer between Xen and guest OS
-
8/8/2019 Xen an art of virtalization
17/23
17/23
I/ O device virtualization
> Network
VIF (Virtual network Interface)
VFR (Virtual Firewall Router)
> Disk
VBD (Virtual Block Device)
SCSI disk
-
8/8/2019 Xen an art of virtalization
18/23
18/23
Evaluation
> Experiment environment
Dell 2650 dual processor 2.4GHz Xeon server w ith 2GB RAM
Linux 2.4.21
> Compared VMMs
(native) Linux
XenoLinux
VMware workstation 3.2
User-Mode Linux
-
8/8/2019 Xen an art of virtalization
19/23
19/23
Evaluation
> Relative performance
-
8/8/2019 Xen an art of virtalization
20/23
20/23
Evaluation
> Performance of guest OS
-
8/8/2019 Xen an art of virtalization
21/23
21/23
Evaluation
> Concurrent VM performance
-
8/8/2019 Xen an art of virtalization
22/23
22/23
Evaluation
> Scalability
-
8/8/2019 Xen an art of virtalization
23/23
23/23
Current status
> Direct access to hardware device in driver domain
> SMP guest
> Hardware virtualization technique support (Intel VT, AMDPacifica)
>VM relocation (live migration)