LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   qemu says my cpu is too old (https://www.linuxquestions.org/questions/slackware-14/qemu-says-my-cpu-is-too-old-897074/)

zoran119 08-13-2011 12:40 AM

qemu says my cpu is too old
 
hi all,

i'm trying to run windows 7 as a guest in qemu, and am getting the following error:

Code:

kvm: vm entry failed with error 0x80000021

If you're runnning a guest on an Intel machine without
unrestricted mode support, the failure can be most likely
due to the guest entering an invalid state for Intel VT.
For example, the guest maybe running in big real mode
which is not supported on less recent Intel processors.

kvm_run returned -22

i asked in #qemu on freenode, and someone suggested that my cpu is too old (intel q9550), but then i found someone having the same problem with an i7 (http://forums.meulie.net/viewtopic.php?f=43&t=6861).

i cannot find a solution to the problem on the net (or a confirmation that my cpu cannot do the job).

any ideas how to fix this?

edit: windows 7 installs fine, and then qemu gives this error after reboot. it runs fine (but sloooow) if i use -no-kvm.

ponce 08-13-2011 01:07 AM

have a look at this topic, if you are using qemu-kvm on an AMD cpu on slackware 32bit with kernel <2.6.34 (it has be patched/rebuilt).

zoran119 08-13-2011 01:20 AM

Quote:

Originally Posted by ponce (Post 4441511)
if you are using qemu-kvm on an AMD cpu on slackware 32bit with kernel <2.6.34 (it has be patched/rebuilt).

i have an intel cpu and running 2.6.38 so i don't think this applies...

Gerard Lally 08-13-2011 02:57 AM

It's not just your CPU: your motherboard has to support virtualization as well, something that can usually be enabled in BIOS. Do other OSes run as VMs without issue?

TobiSGD 08-13-2011 03:06 AM

The Core2Quad Q9550 supports hardware virtualization for sure. As said above, have a look in your BIOS if it is disabled. If you have a custom kernel it may be disabled there also.
If it is enabled in BIOS and kernel and works with other virtualization environments, like Virtualbox, I would file a bug against qemu.

zoran119 08-13-2011 03:12 AM

no problems with other vms. i run slackware, centos, ubuntu and windows xp, no problems at all. haven't tried virtual box...

the3dfxdude 08-13-2011 10:30 AM

You need to do this for KVM:
  • Have a CPU with extensions that support kvm. (I think it is vmx on intel chips)
  • Turn kvm on in the BIOS.
  • Boot slackware and modprobe kvm-intel, so your kernel you use needs to have support for it.
  • Run Qemu with kvm, having built for kvm

TobiSGD 08-13-2011 10:33 AM

Quote:

Originally Posted by the3dfxdude (Post 4441861)
You need to do this for KVM:
  • Have a CPU with extensions that support kvm. (I think it is vmx on intel chips)
  • Turn kvm on in the BIOS.
  • Boot slackware and modprobe kvm-intel, so your kernel you use needs to have support for it.
  • Run Qemu with kvm, having built for kvm

Since he states that this problems only occur with a Windows 7 guest I think that all these requirements are fulfilled. I would rather think that it is a bug in qemu.

zoran119 08-15-2011 07:23 AM

works with virtualbox...

TobiSGD 08-15-2011 07:27 AM

Then I would file a bug against qemu.

Alien Bob 08-15-2011 08:15 AM

Are you running your Windows 7 guest in a VM with 4GB or more of memory allocated to it? If so, try reducing the amount of RAM for the guest to below 4GB.

Eric

zoran119 08-15-2011 08:52 AM

Quote:

Originally Posted by Alien Bob (Post 4443439)
Are you running your Windows 7 guest in a VM with 4GB or more of memory allocated to it? Eric

no, i'm not. i have been trying with 2000 and 1000 mb... no luck. the command line is:

Code:

qemu -m 1000 -vnc :15 hd.qcow

niels.horn 08-15-2011 10:26 AM

qemu-kvm-15.0 was released and the new code does not contain that error any more.
(see http://git.kernel.org/?p=virt/kvm/qe...iff;h=c94391b6)

The new version is in the "pending" queue of SlackBuilds.org awaiting approval.

I have no Windows 7 media here to test if this solves your problem, but it might be worth a try...
At least *that* message you will not see again :)

Alien Bob 08-15-2011 12:54 PM

If you are eager to test and not so eager to first compile qemu-kvm you can get a 0.15.0 package at http://slackware.com/~alien/slackbuilds/qemu-kvm/ .
This is for Slackware 13.37 and you will also need the VDE package against which my qemu-kvm has been compiled: http://slackware.com/~alien/slackbuilds/vde/

Eric

zoran119 08-15-2011 04:48 PM

i have installed alienbob's qemu-kvm 0.15.0 binary package... still getting the error...


All times are GMT -5. The time now is 05:58 PM.