Description of problem: 'virsh vol-dumpxml' failed to get vol info for images created with host_cdrom json backing when the cdrom is empty Version-Release number of selected component (if applicable): libvirt-4.4.0-2.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Create backing file with host_cdrom json backing and the cdrom is empty: # qemu-img create -f qcow2 -b 'json:{"file.driver":"host_cdrom", "file.filename":"/dev/sr0"}' /var/lib/libvirt/images/host_cdrom.img Formatting '/var/lib/libvirt/images/host_cdrom.img', fmt=qcow2 size=1073741312 backing_file=json:{"file.driver":"host_cdrom",, "file.filename":"/dev/sr0"} cluster_size=65536 lazy_refcounts=off refcount_bits=16 2.Refresh the pool: #virsh pool-refresh default Pool default refreshed 3.Execute 'virsh vol-dumpxml': #virsh vol-dumpxml host_cdrom.img default error: cannot read header '/dev/sr0': Input/output error Actual results: 'virsh vol-dumpxml' failed to get vol info for images created with host_cdrom json backing when the cdrom is empty. Expected results: 'virsh vol-dumpxml' should work well for images created with host cdrom json backing Additional info: 1.Can get images info successfully with 'qemu-img info' # qemu-img info /var/lib/libvirt/images/host_cdrom.img image: /var/lib/libvirt/images/host_cdrom.img file format: qcow2 virtual size: 1.0G (1073741312 bytes) disk size: 196K cluster_size: 65536 backing file: json:{"file.driver":"host_cdrom", "file.filename":"/dev/sr0"} Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false
Send a patch to upstream: https://www.redhat.com/archives/libvir-list/2018-July/msg00655.html
This bug is going to be addressed in the next major release.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.