Professional Documents
Culture Documents
2. Introduction to KVM
3. Introduction to FusionCompute
How is a virtual
machine
created?
2007 2014
HP launched HP-UX Rocket was launched.
Guest Machine
Virtualization software layer, or
Physical machine
App App
VM VM VM App VMM
VMM Host OS
Hardware Hardware
A Type1 hypervisor manages all (physical) resources and Physical resources are managed by the host OS
virtual environments VMM provides Virt. Serv. and funct.. as a common app in the under OS
Host OS
Partitioned Isolated
Encapsulated Independent
VM VM
Common
Application
Ring 3
Ring 2
Decided by architecture
2. Trap-and Emulation:
a. When a privileged instruction arrives, it will be sent to VMM for emulation
b. VMM, on behalf of the VM, sends the privileged instruction to the real HW CPU
Non-virtualizable Virtualizable
Application Application
Ring 3 Ring 3
Ring 2 Ring 2
Paravirtualized
Guest OS
Guest OS
Ring 1 Ring 1
Hypervisor Hypervisor
Ring 0 Ring 0
Hardware Hardware
Ring 1
Guest OS
Ring 0 privileged instructions are targeted with
ROOT mode a new CPU execution mode feature that
Hypervisor
allows the VMM to run in a new root
mode below ring 0
Hardware
VM memory
Host memory
0
VM OS VMM
Machine memory
2. VMM intercepts the request and sends the real access request to the physical device
+ The VM might use any OS, the OS does not need to be modified
+ Multiple VMs can directly use the I/O device of the physical server
- Real-time monitoring and emulation are implemented by software programs on the CPU,
which causes severe performance loss to the server.
1. The VMs send I/O requests to the privileged VM through the frontend driver
2. The backend driver of the privileged VM collects the I/O requests, processes them by time and
by channel, runs the physical I/O device driver and sends the I/O request to the phy I/O device
Compute Virtualization
CPU virtualization, memory virtualization,
I/O virtualization
KVM Hyper-V
Huawei
FusionSphere
PV
Backends
HW PV PV PV QEMU QEMU
Drivers Frontends Frontends Frontends
KVM
Xen Lunix
HW Drivers
Hardware Hardware
2. Introduction to KVM
3. Introduction to FusionCompute
VM VM
Application program A Application program B
Binaries/Libraries Binaries/Libraries
User
Guest OS Guest OS
Space User
ProcessesSpace QEMU QEMU
Processes
User space
Kernel space
KVM
Linux kernel
module
Physical
hardware
Libvirt
The KVM kernel module is the core
of the KVM VM QEMU is required to implement
• Initializes the CPU hardware other (I/O) virtualization functions
• Enables the virtualization mode →
• Runs the guest machine in the VM Linux Kernel KVM kernel module and
mode (KVM module)
• Supports the running of the virtual
QEMU form a complete
client QEMU QEMU virtualization technology
• Only provides CPU and memory Guest Guest
virtualization OS OS
VM VM VM VM
(Guest OS) (Guest OS) (Guest OS) (Guest OS)
Manage-
ment
Hypervisor Hypervisor Tools Hypervisor
Libvirt
Linux host Linux host
Node Node
• Each hypervisor has its own management tool • Libvirt can connect to various hypervisors
• Hypervisors are not unified • Libvirt serves as a middleware between the
• → Severely affects the cloud computing management tool and the hypervisor
environment
Guest OS
4
I/O Shared Page 1 10
QEMU I/O 7
Emulation Code Device Driver
3 8
Notification 2 9
Physical Hardware
Guest OS
QEMU
1 8
3 2
Virtio Backend Virtio Frontend
Driver vring Driver
6 7
Notification
I/O Trap Code
4
KVM Module
Linux Kernel
Device Driver
Physical Hardware
2. Introduction to KVM
3. Introduction to FusionCompute
VRM
Virtual Resource Pools
Cluster
Physical Physical
resource resource
Physical
resource
Virtual
resource
VRM VRM
A. Guest OS
B. VMM
C. Hypervisor
D. Host OS
2. All open-source virtualization technologies are type 1 virtualization, while all closed-
source ones are type 2 virtualization.
A. TRUE
B. FALSE