VM fails to start with error "Failed to lock byte 100" with QEMU 6.0

I’m trying to start an empty VM via LXD so that I can install Manjaro on it, but the start command errors out with the following output:

~$ lxc start VM-NAME
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited -- /usr/bin/qemu-system-x86_64 -S -name VM-NAME -uuid d505af76-9c93-4174-95fb-3c32307b8df1 -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/log/lxd/VM-NAME/qemu.conf -spice unix=on,disable-ticketing=on,addr=/var/log/lxd/VM-NAME/qemu.spice -pidfile /var/log/lxd/VM-NAME/qemu.pid -D /var/log/lxd/VM-NAME/qemu.log -chroot /var/lib/lxd/virtual-machines/VM-NAME -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas nobody: char device redirected to /dev/pts/8 (label console)
: Process exited with a non-zero value
Try `lxc info --show-log VM-NAME` for more info

When I run lxc info --show-log VM-NAME I get the following output:

Name: VM-NAME
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/05/23 17:16 UTC
Status: Stopped
Type: virtual-machine
Profiles: vm-default

Log:

qemu-system-x86_64:/var/log/lxd/VM-NAME/qemu.conf:54: Failed to lock byte 100

Not sure if the above error is related, or just because the VM didn’t start successfully.

Host Info:
Arch Linux 5.12.5-arch1-1
LXD Version 4.14
qemu-headless 6.0.0-3
libvirt 1:7.3.0-1
edk2-ovmf 202102-1

LXD doesn’t currently support QEMU 6.0 so you will likely have problems using that version.

We are currently waiting on some bug fixes from upstream to land in the main QEMU branch so we can backport them, and these will also need to be backported by the Arch maintainers.

The QEMU inside the LXD snap package is currently pinned on the 5.2 branch.

Gotcha. Thanks for the heads up. I guess I’ll have to try and compile 5.2.

Don’t suppose you got this working? I installed qemu 5.2.0-4 from the Arch package archives but I’m still getting the same error as you posted in the original message.

Haven’t had a chance to do any more with it yet, unfortunately.

Tracking QEMU 6.0 support here: