0

can some one please clarify this.

I am new to kvm and created two guest instances one linux and one windows.

On both Guests, CPU is showing as QEMU virtual CPU,why is it so?

if kvm utilizes hardware virtualization and Qemu an emulator then what is the role of kvm in virtualization,since in this case its showing only emulated cpu,which i believe is the work of Qemu and not kvm.

On xen, which i am familiar guests cpu are shown as it like an actual hardware,even if it is using qemu drivers.

kevin
  • 191
  • 5
  • 16

3 Answers3

3

By default, QEMU/KVM exposes only a subset of CPU features to guests, so that a VM can be migrated from one CPU to another (e.g. from an Intel Xeon to an AMD Opteron) without any ill effects.

You can override this behavior if you wish, by passing parameters on the qemu command line, or setting the appropriate CPU options in your GUI/XML front end. You can select specific CPU features to expose, or to pass through all CPU features.

If you choose to override any of the parameters, then you will only be able to migrate the VM to another CPU which also has those features. If you choose to pass all host CPU features to the guest, then it will also expose the name of the CPU, and you will be unable to migrate the VM to a CPU of a different type.

The difference between QEMU and KVM is that QEMU is full processor emulation, while KVM provides full hardware virtualization (HVM) using the processor's native virtualization capability (Intel VT-x or AMD SVM) to provide near-native CPU performance. As a result, the former is much slower than the latter.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • It's also worth pointing out that QEMU doesn't do anything that KVM can do better. If QEMU doesn't need to emulate it (e.g. x86 guest on x86 host with Intel VT) then it won't. QEMU provides an abstraction layer between things it has to emulate and things KVM can run through full hardware virtualisation. In essence, by running QEMU, as long as you tweak the guest and host, you'll be running as optimised with as much virtualisation features, compatibility and stability as possible. – NotoriousPyro Jul 04 '17 at 16:11
0

What's in a name? that which we call a rose

By any other name would smell as sweet;

And so also true of virtualised CPUs.

Tom O'Connor
  • 27,480
  • 10
  • 73
  • 148
0

qemu a user space program emulates hosts hardware utilizing /dev/kvm interface.KVM itself doesnot have any capability to emulate.

ananthan
  • 1,510
  • 1
  • 18
  • 28