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 1989841 - RFE: qemu-img cannot convert images into vmdk and vpc formats
Summary: RFE: qemu-img cannot convert images into vmdk and vpc formats
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: beta
: ---
Assignee: Kevin Wolf
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-04 07:39 UTC by Ondřej Budai
Modified: 2021-12-07 22:40 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-6.0.0-12.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:20:54 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src qemu-kvm merge_requests 34 0 None None None 2021-08-16 15:02:03 UTC
Red Hat Issue Tracker RHELPLAN-92239 0 None None None 2021-08-04 07:41:34 UTC

Description Ondřej Budai 2021-08-04 07:39:18 UTC
Description of problem:
osbuild-composer is a tool for building RHEL images on-premise for various cloud platforms. Different platforms support different image formats therefore we use qemu-img to convert a raw image into different formats. Unfortunately, qemu-img in RHEL 9 doesn't support converting into vpc (we need that for Azure), nor vmdk (we need that for VMware). This is currently a blocker for us - we need to ship this functionality to customers in RHEL 9.

We convert images into vpc and vmdk formats without any issues on RHEL 8.


Version-Release number of selected component (if applicable):
qemu-img-6.0.0-10.el9.x86_64

How reproducible:
100%

Step to Reproduce:
qemu-img convert -O vpc Fedora-Cloud-Base-34-1.2.x86_64.raw test.vhd

Actual results:
qemu-img: Could not open 'test.vhd': Driver 'vpc' can only be used for read-only devices

Expected results:
test.vhd file is created and contains the same content as the input file but in a different disk image format

Additional info:
The same reproducer applies also for vmdk.

Comment 2 Colin Walters 2021-08-04 15:30:46 UTC
Right now Fedora CoreOS and RHEL CoreOS use a Fedora-derived userspace to build our images in https://github.com/coreos/coreos-assembler/ but we've definitely talked about using a CS/RHEL userspace in the past, and this would definitely break us too.  (Eventually perhaps we'll also unify some tooling between Image Builder and coreos-assembler).

Perhaps we can gate things behind e.g. `env QEMU_IMG_ENABLE_UNSUPPORTED_BACKENDS=1 qemu-img convert -f vmdk ...`?

Comment 20 Tingting Mao 2021-08-23 02:59:04 UTC
Verified this bug as below:


Tested with:
qemu-kvm-6.0.0-12.el9
kernel-5.14.0-0.rc4.35.el9.x86_64


Steps:
1. Create a source raw image file
# qemu-img create -f raw test.img 5G

2. Convert it to a vmdk image file
# qemu-img convert -f raw -O vmdk test.img tgt.vmdk -p
    (100.00/100%)
# qemu-img info tgt.vmdk 
image: tgt.vmdk
file format: vmdk
virtual size: 5 GiB (5368709120 bytes)
disk size: 704 KiB
cluster_size: 65536
Format specific information:
    cid: 1957518512
    parent cid: 4294967295
    create type: monolithicSparse
    extents:
        [0]:
            virtual size: 5368709120
            filename: tgt.vmdk
            cluster size: 65536
            format: 

3. Convert to a vpc image file
# qemu-img convert -f raw -O vpc test.img tgt.vpc -p
    (100.00/100%)
# qemu-img info tgt.vpc 
image: tgt.vpc
file format: vpc
virtual size: 5 GiB (5368946688 bytes)
disk size: 16 KiB
cluster_size: 2097152


Results:
As above, converting all successed.

Comment 22 Yanan Fu 2021-08-23 06:45:57 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.


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