It looks like your XML configuration mostly checks out for running an ARM Windows version on an aarch64 Fedora install using QEMU and libvirt. However, the error message "Image type x64 cant be loaded on aarch64" suggests that there might be confusion around the architecture of the image that is attempting to be booted. Here are several checkpoints and suggestions for troubleshooting and ensuring an appropriate setup:
-
Verify the Image: Double-check that the Windows 11 ARM image you've downloaded is indeed for ARM64 architecture. The file name you've provided (Windows11_InsiderPreview_Client_ARM64_en-us_22598.VHDX) suggests it is correct, but it's worth verifying its integrity and architecture. Use a tool that allows you to inspect VHDX files or consult the source where you downloaded the image from for confirmation.
-
Image Type Conversion: You're using a VHDX image directly. While QEMU can theoretically use VHDX images, it's generally more compatible and common to use qcow2 format images or raw images. Consider converting the VHDX to a raw image or a qcow2 format image using qemu-img, for example:
qemu-img convert -O raw /path/to/original.vhdx /path/to/new/image.raw
Or for a qcow2 format:
qemu-img convert -O qcow2 /path/to/original.vhdx /path/to/new/image.qcow2
After conversion, ensure you update the <source file="/path/to/new/image.format"/> in your XML configuration to point to the new image file.
-
Disk and Bus Compatibility: You've configured the Windows disk to attach via USB (<target dev="sda" bus="usb"/>). Windows ARM might have issues booting from a USB-attached disk. Changing the disk bus to virtio or scsi might help. For an ARM-based VM, virtio is usually a good choice for performance and compatibility. Update your disk device section to use virtio like this:
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/path/to/new/image.qcow2"/>
<target dev="vda" bus="virtio"/>
</disk>
-
Ensure QEMU and libvirt Support: Make sure your QEMU and libvirt installations support ARM Virtualization fully. You're already using qemu-system-aarch64, but ensure all dependencies are up to date, especially those related to EFI for ARM.
-
NVRAM and Firmware Check: Your configuration points to the appropriate ARM EFI firmware and NVRAM template paths. Ensure these files exist and are accessible by QEMU. Sometimes, issues can arise if the firmware files are not the correct versions or are corrupted.
-
Secure Boot: You've disabled Secure Boot in your XML (<feature enabled="no" name="secure-boot"/>). This is usually a good troubleshooting step, but ensure that the Windows ARM image you're using doesn't require Secure Boot to be enabled. If it does, you'll need to ensure your setup supports Secure Boot for VMs.
After making sure all these points are checked and possibly applying the suggested adjustments, try starting the VM again. If the problem persists, consider looking at QEMU logs for more detailed error information, which might provide further clues on what's going wrong.