Virtualization is not supported on this platform

I have an AMD 5650x CPU with Alpine Linux running LXD, and everything seems to work just fine. However, when trying to start a VM I get the above, rather unhelpful error message, but when I try to just manually start a VM using qemu, I get no such error. What does LXD check for before just handing over the virtualization to qemu/libvirt?

You need at least:

  • /dev/kvm
  • vhost_vsock kernel module loaded (LXD tries to load it for you)
  • A supported architecture (likely the case)
  • qemu itself be available (we run qemu --version)

Anything in dmesg or system journal? Do you have the required kernel modules loaded (at least KVM*, VHOST_VSOCK, MACVTAP)? And most importantly, do you have virtualization enabled in your BIOS/UEFI? Does qemu itself run?