Bobcares

KVM: entry failed, hardware error 0x80000021 | Solution

PDF Header PDF Footer

Learn how to fix “KVM: entry failed, hardware error 0x80000021”. Our KVM Support team is here to help you with your questions and concerns.

KVM: entry failed, hardware error 0x80000021 | Solution

KVM: entry failed, hardware error 0x80000021 | SolutionRunning into errors when managing virtual machines using Kernel-based Virtual Machine (KVM) can get frustrating. These errors can cause unexpected crashes or downtime. Here is one such error:

KVM: entry failed, hardware error 0x80000021

This issue typically points to a low-level problem with the virtualization environment, often related to hardware compatibility, firmware settings, or guest OS configuration.

Let’s examine the causes of this error and how to resolve it.

What Does This Error Mean?

The error code `0x80000021` translates to `HVMSG_UNRECOVERABLE_EXCEPTION`, indicating that the hypervisor encountered an unrecoverable exception when trying to enter a virtual machine. This can happen when the guest OS attempts to execute an unsupported instruction or enters an invalid state.

This error commonly occurs on Intel-based systems using Intel Virtualization Technology (VT-x), and can render affected VMs unresponsive or crash.

If you’re new to KVM or comparing it with other hypervisors, check out our guide on KVM hypervisor’s advantages and disadvantages to understand how it works under the hood.

Key Impacts of the Error

If not resolved quickly, this error can

  • VM crashes or hangs
  • System resource wastage, as the hypervisor continues trying to run the failed VM
  • Operational downtime for hosted services or applications

Common Causes and How to Fix Them

1. Unsupported Guest Mode

Guest OS is in a mode like “big real mode” that the host doesn’t support.

Click here for the Solution.
  • Review the VM’s operating mode in its configuration.
  • Set it to use a compatible mode (e.g., protected mode).
  • Consult the guest OS documentation for mode requirements.

If you’re facing issues booting a Windows VM, this may also tie into errors like “No bootable device” in KVM, which can stem from guest mode or disk configuration issues.

2. Outdated Kernel

Older Linux kernels may lack proper KVM support.

Click here for the Solution.
  1. Check the current kernel version and update the Linux kernel to the latest stable version that is supported by the distribution.


    uname -r
    sudo apt update && sudo apt upgrade
  2. Reboot the machine after the upgrade to apply changes.

3. Incorrect KVM Module Parameters

The KVM module may be misconfigured for Intel hardware.

Click here for the Solution.

Load the KVM module with specific parameters and verify that the module has loaded correctly by checking its parameters.


sudo modprobe kvm_intel emulate_invalid_guest_state=0
modinfo kvm_intel | grep -i parameters

4. BIOS/UEFI Settings Misconfigured

Virtualization settings are disabled in BIOS/UEFI.

Click here for the Solution.
  1. First, reboot and enter BIOS/UEFI (usually via F2, DEL, or ESC).
  2. Then, enable Intel VT-x or AMD-V.
  3. Save and reboot.

5. Incompatible CPU Features

The CPU lacks virtualization features required by the guest.

Click here for the Solution.

Check the CPU specs online for VT-x or AMD-V support. If not present, consider upgrading the processor.

6. Memory Allocation Issues

Insufficient memory causes instability.

Click here for the Solution.
  1. Use the VM manager (e.g., virt-manager) to increase the allocated memory—recommend at least 4GB for modern Vms.
  2. Save and restart the VM.

7. Faulty Hardware

Defective RAM or CPU could be the root of the issue.

Click here for the Solution.
  1. Run diagnostics like Memtest86 or vendor-specific tools.
  2. Replace any faulty hardware components.

8. Incorrect CPU Model Configuration

The CPU model configured for the VM doesn’t match the host CPU.

Click here for the Solution.
  1. First, use virt-manager or Proxmox to edit the VM configuration.
  2. Then, set the CPU model to `host`:
    <cpu mode='host'/>
  3. Save and reboot the VM.

If you’re using QEMU along with KVM and running into issues with connectivity or device passthrough, see our guide on fixing the “QEMU/KVM not connected” issue.

9. Misconfigured VM Settings

Virtualization features like IOMMU or nested virtualization are misconfigured.

Click here for the Solution.
  1. Open the VM configuration settings and enable IOMMU in GRUB:

    For Intel:

    intel_iommu=on

    For AMD

    amd_iommu=on
  2. Now, enable nested virtualization in the hypervisor settings if needed.
  3. Reboot the host machine.

10. Firmware Incompatibility

Outdated firmware may cause virtualization features to misbehave.

Click here for the Solution.

Check the BIOS/UEFI version. Furthermore, visit the motherboard or server manufacturer’s website for firmware updates.

Then, apply updates carefully and reboot.

Also, if you’re trying to use USB devices inside the VM and getting denied access errors, this could be tied to permission issues—our USB redirection error fix guide covers that in detail.

Prevention Strategies

Here are some tips to avoid facing this issue again:

  • Regularly update the system, especially the kernel and virtualization packages.
  • Monitor system logs to catch early signs of VM instability.
  • Test new VM configurations in a sandbox before production deployment.
  • Back up VM settings and data to enable quick recovery.
  • Perform periodic hardware checks to prevent issues caused by aging or failing components.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In brief, our Support Experts demonstrated how to fix “KVM: entry failed, hardware error 0x80000021”.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF