qemu-system-x86_64 -append nokaslr
This is the way to go if you are using QEMU itself to load the kernel with -kernel, as opposed to having a bootloader inside the disk image, as you would do e.g. with an Ubuntu ISO installer.
The nokasrl Linux command line parameter disables KASRL.
This has been needed since v4.12, when KASLR was turned on by default.
Here is a highly automated Buildroot example that uses it.