hellolwq
hellolwq

Reputation: 531

Anyone can introduce some primers about qemu-kvm and kvm?

I am a freshman in Linux KVM. qemu-kvm and kvm are both very complicated now. Can anyone introduce some primers about qemu-kvm and kvm? thanks very much!

Upvotes: 2

Views: 1222

Answers (3)

peeyush
peeyush

Reputation: 2921

Putting in a nutshell:

QEMU : An emulator which translates the instruction of a Guest operating system to the Host operating system. As you can guess that translation has a certain cost, so you will not see a Guest virtual machine executing as fast as the Host operating system.
For more info see the QEMU wiki

KVM (Kernel Virtual Machine): A module in the Linux Kernel which supports execution of a Guest Virtual Machine on the underlying Host hardware. By support I mean that if your Guest architecture is the same as the Host architecture, then certainly there is no need to translate the instructions as they can directly be executed by the Host. For this modern hardware are equipped with special registers and storage locations which are leveraged by KVM. Also KVM is a kernel module, therefore a virtualizer program in userspace is needed to use KVM, which is QEMU. For more info see the KVM section in the same wiki.

QEMU-KVM : As I mentioned above, KVM is only a kernel module, so QEMU (or other) is needed to use KVM. When KVM is used with QEMU, control transfers from QEMU to KVM and vice-versa during the execution of a guest virtual machine.

Upvotes: 4

Dr. Death
Dr. Death

Reputation: 55

KVM stands for Kernel based Virtual Machine. It enables you to create as many number of virtual machines (VM) as you like. These machines can be of two types LVM based or Non-LVM based. Those VM's which are LVM based you can take live backups of those VM's. For non-LVM based VM you cannot take their live backup i.e. the VM will be paused just before the backup. Please refer the KVM home page KVM Home Page.

QEMU is a generic and open source machine emulator and virtualizer. When used as a machine emulator, QEMU can run OS'es and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance. When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or when using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.

For managing the KVM VM's you need to install libvirt which is the virtualization library. It provides you the tools for starting, suspending, resuming, cloning, restarting, listing etc. of virtual machines. Please refer libvirt home page for more reference.

If you are working on some backup or recovery process then I suggest you to go through this excellent perl script as well. It will give a fair idea of how the backup and snapshot is being taken for KVM VM's.

KVM based virtual machines are not complicated to use once you go through the theory of their operation and start implementing them. I believe once you start working on them you will find fun in managing them.

Upvotes: 4

aholbreich
aholbreich

Reputation: 5089

Talking about KVM is talking about virtualization technology or about kernel modules (kvm.ko, kvm-intel.ko or kvm-amd-ko). Sometimes KVM is mentioned as a virtual machine, this is not correct, because KVM does not provide virtualized hardware.

Source

Upvotes: 0

Related Questions