LXD supports booting VMs from an ISO image, by attaching a custom disk, and you will likely also need to disable secure boot:
By default the root disk has a boot priority of 1, so setting it higher than that will cause it to be tried first. However in the case of an empty VM the root disk boot will fail and the CD will be tried next anyway.
lxc init v1 --vm --empty
lxc confg set v1 security.secureboot=false
lxc config device add v1 cdrom disk source=/home/user/os.iso boot.priority=2
Note, you may also need to modify the cdrom’s kernel boot parameters to output to the console as some systems only output to the graphics card initially.
E.g for Alpine you would use something like this https://wiki.alpinelinux.org/wiki/Enable_Serial_Console_on_Boot