The error you're encountering is a kernel panic in the LineageOS 23.2 VM running under QEMU on an a1.metal EC2 instance. The specific error is a translation fault (level 3) at virtual address ffffffe9c0022ffc, which typically indicates a memory access violation or a missing page table entry. This is often caused by:
OVMF_CODE_4M.fd or AAVMF_CODE.fd).Ensure KVM is enabled for ARM64 on your a1.metal instance:
bashsudo apt install cpu-checker kvm-ok
If KVM is not available, you may need to enable it in the BIOS or use nested virtualization.
Confirm QEMU is compiled with ARM64 and KVM support:
bashqemu-system-aarch64 -version
Look for KVM in the output.
/usr/share/qemu-efi-aarch64/QEMU_EFI.fd (for QEMU's built-in UEFI)/usr/share/AAVMF/AAVMF_CODE.fd (for AAVMF, ARM64-specific)with:bashVMF_CODE=$(find /usr/share/ -name $([ "$(uname -m)" = "x86_64" ] && echo OVMF_CODE_4M || echo AAVMF_CODE).fd 2>/dev/null)
or:bashVMF_CODE="/usr/share/AAVMF/AAVMF_CODE.fd"
Ensure the file exists:bashVMF_CODE="/usr/share/qemu-efi-aarch64/QEMU_EFI.fd"
bashls -l $VMF_CODE
a1.metal instance uses ARM64 Neoverse-N1 CPUs. Explicitly specify the CPU type:
bash-cpu neoverse-n1
-machine virt,gic-version=3 with:
bash-machine virt,gic-version=max
-bios to explicitly point to the firmware:
bash-bios $VMF_CODE
-accel kvm if KVM is not working and try with TCG (slower):
bash-accel tcg
mke2fs), which may indicate insufficient memory or disk space.bash-m 16384
vda.qcow2, vdb.qcow2) are properly created and have enough space:
bashqemu-img info ./LineageOS_on_*.utm/Data/vda.qcow2
dlkm_loader_mai) is failing. This could be a LineageOS-specific driver.-kernel and -initrd to your QEMU command if you have a custom kernel/initramfs.bash-kernel /path/to/Image -initrd /path/to/initramfs.img
DABT (current EL), IL = 32 bits suggests a 32-bit access in a 64-bit context. This could be due to:
bashuname -m # Should return "aarch64"
-netdev user mode may not work well with ARM64. Try:
bash-netdev type=tap,id=net0,ifname=tap0,script=no,downscript=no \ -device virtio-net-pci,netdev=net0
bash-device usb-ehci,id=usb-bus \ -device usb-kbd,bus=usb-bus.0
Start with a minimal configuration to isolate the issue:
bashqemu-system-aarch64 \ -machine virt,gic-version=max \ -cpu neoverse-n1 \ -accel kvm \ -m 16384 \ -bios /usr/share/AAVMF/AAVMF_CODE.fd \ -drive file=./LineageOS_on_*.utm/Data/vda.qcow2,format=qcow2,if=virtio \ -netdev user,id=net0 \ -device virtio-net-pci,netdev=net0 \ -nographic
If this works, gradually add back other options.
lineage-23.2).Add -d int,cpu_reset to your QEMU command to capture more detailed logs:
bashqemu-system-aarch64 -d int,cpu_reset -D /tmp/qemu.log $LINUX_QEMU_OPTS
Check /tmp/qemu.log for clues.
qemu-system-x86_64If your a1.metal instance supports x86_64 emulation (unlikely, but worth checking), try:
bashqemu-system-x86_64 -enable-kvm -m 8192 ...
However, a1.metal is ARM64-only, so this is not applicable.
Here’s a revised QEMU command based on the above:
bashVMF_CODE="/usr/share/AAVMF/AAVMF_CODE.fd" qemu-system-aarch64 \ -machine virt,gic-version=max \ -cpu neoverse-n1 \ -accel kvm \ -m 16384 \ -bios $VMF_CODE \ -drive if=pflash,unit=0,file=$VMF_CODE,format=raw,readonly=on \ -drive file=./LineageOS_on_*.utm/Data/vda.qcow2,format=qcow2,if=virtio,id=vda \ -drive file=./LineageOS_on_*.utm/Data/vdb.qcow2,format=qcow2,if=virtio,id=vdb \ -device virtio-net-pci,netdev=net0 \ -netdev user,id=net0 \ -device usb-ehci,id=usb-bus \ -device usb-kbd,bus=usb-bus.0 \ -nographic
If the issue persists, share:
qemu-system-aarch64 -version).ls -l /usr/share/AAVMF/ and ls -l /usr/share/qemu-efi-aarch64/.Vibe can make mistakes. Check answers. Learn more