Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1816561

Summary: qemu-img: Protocol driver 'host_device' does not support image creation - when converting to a block device
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Benny Zlotnik <bzlotnik>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: Storage QA Contact: CongLi <coli>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: jinzhao, juzhang, timao, virt-maint
Version: 8.2   
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-24 09:48:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Benny Zlotnik 2020-03-24 09:41:27 UTC
Description of problem:
The behavior when converting an image to block device has changed and now fails with "qemu-img: Protocol driver 'host_device' does not support image creation"

[root@lynx23 ~]# lvcreate -L 100M f1373d19-38a2-4730-b092-3a86b7f3b22d -n foo1
  Rounding up size to full physical extent 128.00 MiB
  Logical volume "foo1" created.
[root@lynx23 ~]# qemu-img create -f raw /dev/f1373d19-38a2-4730-b092-3a86b7f3b22d/foo1 100M
Formatting '/dev/f1373d19-38a2-4730-b092-3a86b7f3b22d/foo1', fmt=raw size=104857600
[root@lynx23 ~]# lvcreate -L 100M f1373d19-38a2-4730-b092-3a86b7f3b22d -n foo2
  Rounding up size to full physical extent 128.00 MiB
  Logical volume "foo2" created.
[root@lynx23 ~]# qemu-img convert -p -t none -T none -f raw /dev/f1373d19-38a2-4730-b092-3a86b7f3b22d/foo1 -O raw -W /dev/f1373d19-38a2-4730-b092-3a86b7f3b22d/foo2
qemu-img: Protocol driver 'host_device' does not support image creation

This can be fixed by adding the '-n' flag, but breaks current behaviour

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

How reproducible:
100%

Steps to Reproduce:
Provided in description
1.
2.
3.

Actual results:


Expected results:


Additional info: