Bug 1816007 - qemu-img convert failed to convert with block device as target
Summary: qemu-img convert failed to convert with block device as target
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.2
Hardware: Unspecified
OS: Linux
urgent
urgent
Target Milestone: rc
: 8.0
Assignee: Maxim Levitsky
QA Contact: CongLi
URL:
Whiteboard:
: 1816561 (view as bug list)
Depends On:
Blocks: 1816004
TreeView+ depends on / blocked
 
Reported: 2020-03-23 07:18 UTC by Longxiang Lyu
Modified: 2020-05-05 09:59 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-4.2.0-17.module+el8.2.0+6129+b14d477b
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:59:00 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:59:43 UTC

Description Longxiang Lyu 2020-03-23 07:18:41 UTC
Description of problem:
qemu-img convert failed to convert with block device as target

Version-Release number of selected component (if applicable):
kernel-4.18.0-175.el8.x86_64
qemu-kvm-4.2.0-15.module+el8.2.0+6029+618ef2ec

How reproducible:
100%

Steps to Reproduce:

# qemu-img convert -f raw -O qcow2 rhel820-64-virtio-scsi.raw /dev/autotest/image1
qemu-img: Protocol driver 'host_device' does not support image creation

Actual results:
conversion to lv failed

Expected results:
conversion to lv should finish without error

Additional info:

Comment 1 Tingting Mao 2020-03-23 07:41:25 UTC
Tried with the last qemu package, there is no the issue. So set 'regression', and update the priority to High.


# qemu-img convert -f raw -O qcow2 base.img /dev/vgtt/image1 -p
    (100.00/100%)

# qemu-img --version
qemu-img version 4.2.0 (qemu-kvm-4.2.0-14.module+el8.2.0+5995+d02a4eeb)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers


Note:
The target LV is based on loop device, created as below:
# qemu-img create -f raw loop.img 50G
# losetup -f loop.img
# pvcreate /dev/loop3
# vgcreate vgtt /dev/loop3 
# lvcreate -L 30G -n image1 vgtt

Comment 2 Tingting Mao 2020-03-24 09:48:39 UTC
*** Bug 1816561 has been marked as a duplicate of this bug. ***

Comment 3 Nir Soffer 2020-03-24 11:24:13 UTC
This breaks RHV. Bumped severity.

Comment 6 Maxim Levitsky 2020-03-26 08:32:39 UTC
I had sent an upstream patch that should fix this.
Tested to make sure that affected block drivers can still create images,
and tested that reproducer from this bug doesn't reproduce it anymore

https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07850.html

Comment 13 Tingting Mao 2020-04-03 03:21:15 UTC
Tried to verify this bug as below, covert works fine now. Set this bug as verified then.


Tested with:
qemu-kvm-4.2.0-17.module+el8.2.0+6129+b14d477b
kernel-4.18.0-190.3.el8.x86_64


Steps:
1. Get info of source image.
# qemu-img info rhel820-64-virtio-scsi.raw
image: rhel820-64-virtio-scsi.raw
file format: raw
virtual size: 20 GiB (21474836480 bytes)
disk size: 20 GiB

2. Setup LV based on loop device.
# qemu-img create -f raw loop.img 50G
# losetup -f loop.img
# pvcreate /dev/loop1 vgtt
# vgcreate vgtt /dev/loop1
# lvcreate -L 25G -n target vgtt

3. Convert
# qemu-img convert -f raw -O qcow2 rhel820-64-virtio-scsi.raw /dev/vgtt/target -p
    (100.00/100%)

Comment 16 errata-xmlrpc 2020-05-05 09:59:00 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/RHBA-2020:2017


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