0

How to know which one I'm currently using when I launch a VM?

Are the QEMU and KVM project merged today? Or they still try to completely merge?

If I really understand, KVM permit to talk to all the hardware "directly" and to use VT-d, QEMU permit to traduce different architecture code, KVM permit to execute the code without any translation, KQemu permit near no translation. I'm I right?

0

KVM is part of two projects: the Linux kernel (which hosts the kernel component of KVM), and QEMU (which hosts the userspace component of KVM). However the kernel part of KVM can be used without QEMU, and QEMU can be used without KVM.

KVM provides access to the virtualisation extensions available on x86 systems; it implements a hypervisor. QEMU provides emulation of the various components required to “build” a virtual PC; it can also provide instruction set translation, but that’s not used with KVM (which as you say, executes guests with no translation).

KQemu is a software-only “accelerator” (a module allowing QEMU to run code without translation on 32-bit x86 with some guests) which was rendered obsolete by KVM.

4
  • kqemu wasn't using any hw virtualization features (amd-v or intel vt-x). It was a purely sw "accelerator" which worked on plain 32bit x86 (just like the vmware kernel modules of old). Saying that it's a predecessor of kvm is misleading -- so is xen too (or, why not, dosemu). – pizdelect Mar 27 '20 at 14:40
  • @pizdelect right, I wasn’t implying any ancestry, only chronological order and vague similarity of purpose; hopefully my update is more accurate. – Stephen Kitt Mar 27 '20 at 15:16
  • Thank you! So, today KWM can't do everything alone? Like if I want a VM with more than a CPU I need QEMU too. And QEMU alone is "garbage" in front of KVM performances, right? And finally, how do I know what I use now on the VM hosted on my computer? – wxi Mar 27 '20 at 16:06
  • Right, a VM with more than a CPU needs QEMU (or some other emulator). QEMU’s performance running x86-on-x86 is quite poor compared to the performance you get with KVM, yes, so if you can use KVM with QEMU, you might as well. Inside a VM, try looking at /proc/cpuinfo; I’m not sure you can easily determine whether KVM is being used from inside the VM, but outside, check kvm_stats and lsof /dev/kvm. – Stephen Kitt Mar 27 '20 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.