KVM and Qemu - Re: Just an intro.

Tony Baechler tony at baechler.net
Tue Mar 26 09:22:53 UTC 2013

Ah, I see the confusion.  As I said, things might have changed in recent 
releases.  As I understand it, KVM has always used Qemu for emulation.  The 
difference is that if you call "qemu," you are not using KVM, so it's very 
slow.  If you call "kvm," it uses the KVM kernel modules and hardware 
virtualization.  So yes, technically you're correct and the web page is 
correct, but you either have to call kvm directly or pass a switch to Qemu 
telling it to use KVM support.  If you have qemu-kvm installed, you will 
have both "qemu" and "kvm" executables.  Now, KVM and Qemu have merged, 
whereas KVM used to be a fork of Qemu.  Sorry about the confusion.  Yes, KVM 
does use and require Qemu and Qemu can use KVM, but they aren't exactly the 
same thing.  It further confuses things when Debian and Ubuntu have renamed 
their "kvm" packages to "qemu-kvm" and split the "qemu" package into 
"qemu-system" and "qemu-user."  The fact still remains that you need 
hardware virtualization to use KVM which not all systems have.

On 3/25/2013 7:24 AM, Christopher Chaltain wrote:
> OK, well I admit I may still have a lot to learn here. I was just going by
> what I read on pages like http://wiki.qemu.org/KVM where it says:
> QEMU can make use of KVM when running a target architecture that is the same
> as the host architecture. For instance, when running qemu-system-x86 on an
> x86 compatible processor, you can take advantage of the KVM acceleration -
> giving you benefit for your host and your guest system.
> I read this on multiple web sites, but you can't always tell what's current
> by reading a web page.
> On 03/25/2013 03:47 AM, Tony Baechler wrote:
>> No, it won't. KVM and Qemu are two different packages, at least on
>> Debian. If you call qemu by itself, you don't use hardware
>> virtualization. If you call kvm without a kvm module loaded, it exits
>> or falls back to Qemu. Perhaps this has changed with newer versions of
>> Qemu, but every version of Qemu I've used is separate from KVM.
>> However, I think they merged the Qemu and KVM code, so you might be
>> right nowadays. There is a difference though and they aren't the same
>> thing. Even in Debian and Ubuntu, you install qemu-kvm, qemu-system and
>> qemu-user if you want a full Qemu and KVM setup.
>> You might be thinking of the kernel Qemu module, but it is now abandoned
>> and no longer recommended. Debian no longer ships it, so it's either
>> straight Qemu without virtualization or KVM if your CPU supports it.
>> Not all hardware supports virtualization, even now. ARM processors
>> wouldn't, for example. My CPU here on my desktop isn't that old and it
>> doesn't, thus bringing me back to why I don't run Windows in a VM. Even
>> with KVM, there is a slight performance hit, but not much.
>> On 3/24/2013 12:23 PM, Christopher Chaltain wrote:
>>> Just a note that qemu will use kvm if hardware virtualization is
>>> available,
>>> so you won't get that performance hit with qemu in those cases.
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/blinux-list

Have a good day,
Tony Baechler
tony at baechler.net

More information about the Blinux-list mailing list