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:
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
*** Bug 1816561 has been marked as a duplicate of this bug. ***
This breaks RHV. Bumped severity.
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
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%)
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