RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1727821 - Failed to convert a source image to the qcow2 image encrypted by luks
Summary: Failed to convert a source image to the qcow2 image encrypted by luks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On: 1575578
Blocks: 1625604 1746712
TreeView+ depends on / blocked
 
Reported: 2019-07-08 09:20 UTC by yujie ma
Modified: 2019-11-05 20:51 UTC (History)
15 users (show)

Fixed In Version: qemu-kvm-2.12.0-85.module+el8.1.0+4010+d6842f29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1575578
Environment:
Last Closed: 2019-11-05 20:51:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3345 0 None None None 2019-11-05 20:51:32 UTC

Description yujie ma 2019-07-08 09:20:36 UTC
+++ This bug was initially created as a clone of Bug #1575578 +++

Description of problem:
Failed to convert a source image to the qcow2 image encrypted by luks


Version-Release number of selected component (if applicable):
kernel-4.18.0-107.el8.x86_64
qemu-kvm-2.12.0-80.module+el8.1.0+3572+48154135


How reproducible:
100%


Steps to Reproduce:
1. Create image with luks-inside-qcow2
# qemu-img create --object secret,id=sec0,data=backing -f qcow2 -o encrypt.format=luks,encrypt.key-secret=sec0 base.qcow2 20G
2.Convert the base.qcow2 to a qcow2 image with luks-inside-qcow2
# qemu-img convert -p --object secret,id=sec0,data=backing --object secret,id=sec2,data=convert --image-opts driver=qcow2,encrypt.key-secret=sec0,file.filename=base.qcow2 -O qcow2 -o encrypt.format=luks,encrypt.key-secret=sec2 convert.qcow2


Actual results:
Convert failed with the message as below:
qemu-img: Could not open 'convert.qcow2': Parameter 'encrypt.key-secret' is required for cipher

Expected results:
Convert successfully.

Additional info:

Comment 5 Tingting Mao 2019-08-20 07:39:47 UTC
Verified this issue as below.


Tested packages:
kernel-4.18.0-134.el8
qemu-kvm-2.12.0-85.module+el8.1.0+4010+d6842f29


Scenario1 (luks-inside-qcow2)
1. Create image
# qemu-img create --object secret,id=sec0,data=backing -f qcow2 -o encrypt.format=luks,encrypt.key-secret=sec0 base.qcow2 20G

2. Convert to a encrypted image, successfully.
# qemu-img convert -p --object secret,id=sec0,data=backing --object secret,id=sec2,data=convert --image-opts driver=qcow2,encrypt.key-secret=sec0,file.filename=base.qcow2 -O qcow2 -o encrypt.format=luks,encrypt.key-secret=sec2 convert.qcow2
    (100.00/100%)

3. Compare the source and target images, they are identical.
# qemu-img compare -p --object secret,id=sec0,data=backing --object secret,id=sec1,data=convert --image-opts driver=qcow2,encrypt.key-secret=sec0,file.filename=base.qcow2 driver=qcow2,encrypt.key-secret=sec1,file.filename=convert.qcow2
Images are identical.


Scenario2 (luks)
1. Create image with luks format
# qemu-img create -f luks --object secret,id=sec0,data=base -o key-secret=sec0 test.luks 10G

2. Convert to another luks image, successfully
# qemu-img convert -p --object secret,id=sec0,data=base --object secret,id=sec1,data=convert --image-opts driver=luks,key-secret=sec0,file.filename=test.luks -O luks -o key-secret=sec1 convert.luks
    (100.00/100%)

3. Compare the two images, and they are identical.
# qemu-img compare -p --object secret,id=sec0,data=base --object secret,id=sec1,data=convert --image-opts driver=luks,key-secret=sec0,file.filename=test.luks driver=luks,key-secret=sec1,file.filename=convert.luks
Images are identical.

Comment 7 errata-xmlrpc 2019-11-05 20:51:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3345


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