LXC container with windows died

163 Views Asked by At

My LXC container with windows 11 died. I've installed official version of windows 11. Here is the log:

lxc info win11 --show-log

Name: win11
Status: STOPPED
Type: virtual-machine
Architecture: x86_64
Created: 2023/09/12 16:26 UTC
Last Used: 2023/09/15 16:49 UTC

Log:

virtio_input_handle_event: unmapped key: 0 [unmapped]
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.

EAX=000003d0 EBX=95bac080 ECX=00000000 EDX=8b09c850
ESI=8b108440 EDI=00000000 EBP=a953a9c0 ESP=6dcd7fb0
EIP=00008000 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=1 HLT=0
ES =0000 00000000 ffffffff 00809300
CS =be00 7ffbe000 ffffffff 00809300
SS =0000 00000000 ffffffff 00809300
DS =0000 00000000 ffffffff 00809300
FS =0000 00000000 ffffffff 00809300
GS =0000 00000000 ffffffff 00809300
LDT=0000 00000000 ffffffff 00c00000
TR =0040 6dc76000 00000067 00008b00
GDT=     6dc77fb0 00000057
IDT=     00000000 00000000
CR0=00050032 CR2=a8416a61 CR3=b535f000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=qemu-system-x86_64: ../hw/core/cpu-sysemu.c:76: cpu_asidx_from_attrs: Assertion `ret < cpu->num_ases && ret >= 0' failed.

It happens quite often, what coult be the reason? And how to fix it?

1

There are 1 best solutions below

0
On

The error message you provided suggests that there is an issue with running Windows 11 as an LXC container using virtualization (KVM) on your host system. This error is related to the virtualization support and could be caused by a few different factors. Here are some possible reasons and steps to troubleshoot the issue:

  1. Host System Compatibility: Ensure that your host system supports virtualization and has KVM (Kernel-based Virtual Machine) enabled in the BIOS/UEFI settings. Make sure that VT-x (Intel) or AMD-V (AMD) virtualization extensions are enabled if your processor supports them.

  2. CPU Compatibility: Ensure that your host system's CPU is compatible with virtualizing Windows 11. Windows 11 has specific hardware requirements, and not all CPUs may be able to run it effectively in a virtualized environment.

  3. LXC Configuration: Check your LXC container configuration to ensure it is set up correctly for running Windows 11. Ensure that you have allocated sufficient resources (CPU, memory, storage) to the container to support Windows 11.

  4. Windows 11 Version: Make sure you are using a compatible version of Windows 11 for virtualization. Some versions of Windows may have issues when run in a virtualized environment.

  5. Virtualization Software: Ensure that your virtualization software, such as QEMU, is up-to-date. Outdated or incompatible versions of QEMU can cause issues with running virtual machines.

  6. KVM Modules: Check that the KVM (Kernel Virtual Machine) modules are loaded and functioning correctly on your host system. You can do this by running lsmod | grep kvm to see if the KVM modules are loaded.

  7. Container Configuration: Review the LXC container's configuration file (usually located in /var/lib/lxc/win11/config) to ensure that it is properly configured for running Windows 11. You may need to adjust settings related to CPU virtualization extensions, memory allocation, and other virtualization-related options.

  8. Check for Updates: Ensure that both your host system and the Windows 11 installation in the container have all available updates and patches applied. This can sometimes resolve compatibility issues.

  9. Debugging: If the issue persists, you may need to dig deeper into debugging the problem. You can try running the container with increased verbosity or debug options to gather more information about the error.

  10. Consult Documentation and Forums: Check the official documentation for LXC, QEMU, and Windows 11 virtualization to see if there are any specific configuration requirements or known issues related to your setup. Also, consider posting your issue on relevant forums or communities for assistance from experienced users.

Remember that virtualizing Windows 11 can be challenging due to its specific hardware requirements and the need for proper virtualization support on the host system. It's essential to ensure that your host system is configured correctly and meets the necessary hardware and software requirements for running Windows 11 in a virtualized environment.