Rate This Document
Findability
Accuracy
Completeness
Readability

Introduction

This document describes how to install QEMU-KVM virtualization on a Kunpeng server running openEuler 22.03 and how to create a VM.

KVM is a virtualization architecture supported by the Linux kernel. It can run the kernel as a hypervisor without additional simulation. KVM uses the kernel module kvm.ko to implement core virtualization functions, which works with modules closely related to processors, such as kvm-amd.ko. KVM does not implement simulations. It exposes the /dev/kvm interface, through which a host machine can create vCPUs, allocate virtual memory address space, read and write vCPU registers, and run vCPUs. After KVM is used, the CPU instructions of the guest OS can run directly without being translated by QEMU, which improves the running speed.

KVM implements CPU and memory virtualization, but it cannot simulate other devices. A tool running in the user space is required to implement complete virtualization. KVM developers choose the virtualization software QEMU as the tool which is common and open source, and improve it so it can simulate I/O devices (such as NICs and drives). Therefore, QEMU-KVM becomes a solution of complete virtualization.

In QEMU-KVM, KVM runs in the kernel space. QEMU runs in the user space and simulates the creation and management of virtual hardware. Invoking the /dev/kvm interface through ioctl, QEMU integrates KVM and enables some CPU instructions to be executed by kernel modules. KVM implements the CPU and memory virtualization, and QEMU simulates I/O devices (such as drives, NICs, and graphics cards). In this way, KVM and QEMU together implement server virtualization.