ubuntu virtualization KVM QEMU libvirt

The relationship between KVM QEMU libvirt is roughly as follows:

qemu,kvm,qemu-kvm,xen,libvir difference
quote

QEMU

QEMU is a set of free software for emulating processors written by Fabrice Bellard. It is similar to Bochs and PearPC, but it has some features that the latter two do not have, such as high speed and cross-platform features, qemu can virtualize virtual machines of different architectures, such as power machines on the x86 platform. . kqemu is the accelerator of qemu. Through the open source accelerator of kqemu, QEMU can simulate the speed close to the real computer.

QEMU itself can be independent of KVM, but if there is KVM and the hardware (processor) supports functions such as Intel VT, then QEMU can use the functions provided by KVM to improve performance in the process of virtualizing the processor.


The relationship between KVM and QEMU To be

precise , KVM is a module of the Linux kernel. You can use the command modprobe to load the KVM module. After the module is loaded, the virtual machine can be further created by other tools. But only the KVM module is not enough, because the user cannot directly control the kernel module to do things, you must also have a tool running in the user space. For this user space tool, kvm developers chose the already formed open source virtualization software QEMU. Speaking of QEMU is also a virtualization software. Its feature is that it can virtualize different CPUs. For example, a Power CPU can be virtualized on an x86 CPU, and a program that can run on Power can be compiled using it. KVM uses a part of QEMU, and with a little modification, it becomes a user space tool that can control KVM. So you will see that the official KVM download has two major parts (qemu and kvm) and three files (KVM modules, QEMU tools, and a collection of the two). That is, you can upgrade only the KVM modules, or only the QEMU tools. This is the relationship between KVM and QEMU.

QEMU is a stand-alone virtualization solution, and from this point of view it does not depend on KVM. KVM is another virtualization solution, but because this solution actually only implements support for processor (Intel VT, AMD SVM) virtualization features in the kernel, in other words, it lacks device virtualization and the corresponding user space A tool for managing virtual machines, so it borrows the code of QEMU and simplifies it. Together with KVM, it constitutes another independent virtualization solution, which may be called: KVM+QEMU.

KVM user space virtual machine management tools have kvm, kvm-img, kvm-nbd, kvm-ok and kvm_stat, in fact, kvm is a symbolic link to qemu-system-x86_64, and kvm-img is a symbolic link to qemu-img. In terms of scope of application, the QEMU virtualization solution supports many other architectures in addition to the x86 architecture, such as qemu-system-m68k, qemu-system-mips64, qemu-system-ppc64, qemu-system-arm and so on. But the current mention of KVM generally refers to solutions based on Intel VT and AMD SVM on x86, although the work of porting KVM to ARM and PPC is currently in progress.


Of course, since redhat has begun to support KVM, it thinks that the user space virtual machine management tool in the KVM+QEMU' scheme is not very easy to use, or the versatility is not strong, so redhat thought of a libvirt, an API for managing virtual machines The library is not only for KVM, but can also manage virtual machines under Xen and other solutions.


KVM (kernel-based virtual machine) Chinese meaning: Kernel-based virtual machine

(1) is a linux [full virtualization] solution with x86 architecture and hardware supporting virtualization technology (such as intel VT or AMD-V).

(2) It contains a loadable core module kvm.ko (kvm-intel.ko or kvm-AMD.ko) that provides low-level virtualization for the processor.

(3) kvm also needs a modified QEMU software (qemu-kvm) as the upper-level control and interface of the virtual machine.

(4) kvm can run multiple virtual machines at the same time without changing the linux or windows image, (ps: it means that multiple virtual machines use the same image) and configure a personalized hardware environment (network card) for each virtual machine , disk, graphics adapter...).

(5) In mainstream linux kernels, such as kernels above 2.6.20, the kvm core is included.



The full name of qemu is Quick Emulator. kvm does not need qemu for virtual processing, but only needs its upper management interface for virtual machine control. The virtual machine is still driven by kvm.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326538689&siteId=291194637