Skip to contentSkip to conversation

***KVM with QEMU*** : KVM: entry failed, hardware error 0x80000021

DISCUSSION Arnab 1 participant 1 message Sep 15, 2017 KVM

lore
Share & tools
lore

Arnab

author
#0 lore raw

Hello,

Before I start, my system details are:-

Host

Ubuntu 17.04
Linux Kernel - 4.11.3
CPU x86_64 (Broadwell)

Guest

Ubuntu 16.04
Linux Kernel -4.4.0-62-generic
CPU x86_64 (default)

I have been trying to load a QEMU snapshot with KVM enabled but I always seem to be hitting the below error :-

KVM: entry failed, hardware error 0x80000021

If you're running 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.

Basically I am following the below steps :

1. I will start QEMU first without KVM, I will run a workload and then I create a snapshot (using SAVEVM).

2. Once I am done, I allow the workload to complete and then quit QEMU.

3. Next time, I try to load this snapshot back while booting QEMU and at the same time, enable-KVM as well. I use the below command :-

./qemu-system-x86_64 -m 10G -enable-kvm -machine pc-i440fx-2.8 -drive file=~/os-images-for-qemu/ubuntu16.04.server.qcow2,format=qcow2 -loadvm twenty-three

4. After this, I get the above error as mentioned.

I am using the same machine configuration while saving and loading. I only change the flags to disable kvm when saving and enable-kvm while loading.

I would like to know if there are steps in place to resolve this issue.

I have already tried loading the kvm_intel module with the parameter emulate_invalid_guest_state=0. But that did not help at all.

Thanks.
Arnab