qemu-img create -f luks -o preallocation=full works (it was originally reported as returning error, see bug 1534951), but this is not supported with LUKS and the image is not preallocated.
This BZ is about changing that behavior to return error until preallocation is supported (tracked in bug 1534951). Need to confirm if this is a regression.
How to reproduce:
$ qemu-img create -f luks -o ?
Supported options:
size Virtual disk size
key-secret ID of the secret that provides the keyslot passphrase
cipher-alg Name of encryption cipher algorithm
cipher-mode Name of encryption cipher mode
ivgen-alg Name of IV generator algorithm
ivgen-hash-alg Name of IV generator hash algorithm
hash-alg Name of encryption hash algorithm
iter-time Time to spend in PBKDF in milliseconds
$ qemu-img create -f luks --object secret,id=sec0,data=base -o key-secret=sec0 base.luks 1G -o preallocation=full
Formatting 'base.luks', fmt=luks size=1073741824 key-secret=sec0 preallocation=full
[ademar@optimus ~]$ qemu-img info base.luks | head -n 5
image: base.luks
file format: luks
virtual size: 1.0G (1073741824 bytes)
disk size: 256K
encrypted: yes
$ qemu-img --version
qemu-img version 2.12.0 (qemu-2.12.0-1.fc27)
+++ This bug was initially created as a clone of Bug #1534951 +++