FS#14166 - QEMU 0.10.2-1 + kernel 2.6.29 = KVM broken

Attached to Project: Arch Linux
Opened by Kenni Lund (Kenni) - Thursday, 09 April 2009, 20:47 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 10 April 2009, 17:57 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture i686
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
It's not possible to boot a virtual machine with KVM support in QEMU 0.10.2-1, I have this issue on two independent Arch systems running QEMU + KVM.

With the QEMU 0.9.x Arch package (containing both qemu and KVM userspace) you could boot a virtual machine with a command like the following:
qemu-kvm -smp 2 -m 1024 -daemonize -vnc :1 -hda /data/virtualization/winxp.img -boot c

As the pacman install notes says, KVM is now supported in QEMU 0.10, which means that the command should be changed to:
qemu -enable-kvm -smp 2 -m 1024 -daemonize -vnc :1 -hda /data/virtualization/winxp.img -boot c

Running this command returns the following error:
"failed to initialize KVM"

Removing "-smp 2" allows the virtual machine to boot, but it's very slow and according to the virtual machine, the CPU is a Pentium II - which seems to confirm that KVM is not running.

Additional info:
[root@D520 ~]# uname -a
Linux D520 2.6.29-ARCH #1 SMP PREEMPT Wed Apr 8 12:47:56 UTC 2009 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux

[root@D520 ~]# pacman -Q qemu kernel26
qemu 0.10.2-1
kernel26 2.6.29.1-3

[root@D520 ~]# lsmod | grep kvm
kvm_intel 39208 0
kvm 144944 1 kvm_intel

Steps to reproduce:
Upgrade to the above mentioned kernel and QEMU version and try to start a virtual machine with KVM support.


Perhaps it would be better to stick with the usermode qemu-kvm from the kvm-package and wait to use the KVM functionality in the QEMU package, until QEMU and KVM userspace are fully merged upstream (3-6 months from now?). The merge process seems to make it kinda messy right now...:
kvm@vger.kernel.org/msg11335.html"> http://www.mail-archive.com/kvm@vger.kernel.org/msg11335.html
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Friday, 10 April 2009, 17:57 GMT
Reason for closing:  Fixed
Comment by Tobias Powalowski (tpowa) - Friday, 10 April 2009, 07:07 GMT
The slowness is because of the missing permission, i upload a -2 package soon, which corrects this.
Comment by Kenni Lund (Kenni) - Friday, 10 April 2009, 07:40 GMT
So from QEMU 0.10 and onwards QEMU+KVM is not supposed to emulate a "QEMU CPU" anymore, but a Pentium II instead? I can't find anything about this in the changelog. Pentium II used to be the default CPU in QEMU when no acceleration was used at all.

I don't know which missing permission you're talking about, but I'm running as root, to minimize permission issues.

Do you know if this permission thing will fix the SMP problem as well?
Comment by Tobias Powalowski (tpowa) - Friday, 10 April 2009, 08:03 GMT
no smp doesn't work here either. But you can still build kvm version if it works better for you.
Comment by Damjan Georgievski (damjan) - Friday, 10 April 2009, 15:44 GMT
It seems not all of the KVM features are ported to the vanilla Qemu, yet.

For example, booting my kernel under qemu-kvm reported "Booting paravirtualized kernel on KVM" or some such, while this new qemu says "Booting ... on bare machine".

Also gone is the support for kvm-clocks.

Also qemu 0.10.2 can't boot from a virtio block device (-drive file=jeos.img,if=virtio)
Comment by Tobias Powalowski (tpowa) - Friday, 10 April 2009, 17:57 GMT
added kvm package to extra, you can use this instead.

Loading...