3

Are QEMU and KVM both kernel modules?

In VirtualBox, what are the equivalences to these kernel modules?

Thanks.

  • Do the unaccelrated solutions by qemu and virtualbox not use any kernel module? – Tim Mar 25 at 14:47
5

KVM is implemented as a number of kernel modules, kvm and an architecture-specific module (kvm-amd for AMD, kvm-intel for Intel). QEMU is a user-space application which can use KVM if it’s available but doesn’t need it.

VirtualBox also has several kernel modules, the main one of which is vboxdrv. This handles ring 0 duties for VirtualBox.

The two sets of kernel modules are similar but not identical, i.e. their features don’t overlap exactly. The virtualisation details in both setups are quite different.

(If you look through VirtualBox you’ll find references to KVM, but it doesn’t use KVM. It contains some source code referencing KVM, because it includes QEMU’s recompiler, but the KVM support is explicitly disabled. It also provides a KVM-compatible paravirtualisation interface for guests. You must take care never to use different virtual machine hosts with hardware acceleration in parallel, because they are liable to walk over each other and potentially crash the host — so you can run multiple VMs with QEMU and KVM, but don’t try running VMs with QEMU/KVM and VirtualBox simultaneously.)

  • Thanks. How do I know if I run a KVM (or Virtualbox) VM with hardware acceraltion or not? – Tim Mar 25 at 17:54
  • Is QEMU really a user space process instead of a kernel module? unix.stackexchange.com/a/506417/674 says "Qemu is the lowest level that emulates processor and peripherals" and "KVM is to accelerate it if CPU has VT enabled", so I thought both QEMU and KVM are kernel modules. – Tim Mar 25 at 17:58
  • Is it correct that libvirt is a server process, and VMM a client process? Is QEMU also a server to VMM? What is the relation and difference between QEMU and libvirt processes? Do all the four components communicate by KVM <->QEMU <-> libvirt <-> VMM? – Tim Mar 25 at 18:01
  • What’s the point in repeating your comment on different questions? This question has nothing to do with VMM and libvirt. – Stephen Kitt Mar 25 at 19:08
  • If you use KVM, you’ve got hardware acceleration (so with QEMU, qemu-kvm or the KVM “enable” option). I don’t know the equivalent in VirtualBox off-hand. – Stephen Kitt Mar 25 at 19:10

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.