Bug 1594864 - qemu-img create -f luks: preallocation option is accepted, but doesn't work
Summary: qemu-img create -f luks: preallocation option is accepted, but doesn't work
Keywords:
Status: CLOSED DUPLICATE of bug 1534951
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Maxim Levitsky
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On: 1534951
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-25 14:51 UTC by Ademar Reis
Modified: 2019-07-11 11:37 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1534951
Environment:
Last Closed: 2019-07-11 11:37:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ademar Reis 2018-06-25 14:51:29 UTC
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 +++

Comment 3 Ademar Reis 2018-12-21 23:10:16 UTC
See also bug #1534951.


Note You need to log in before you can comment on or make changes to this bug.