On Thu, Feb 06, 2020 at 17:20:19 +0000, Richard W.M. Jones wrote: > In the guestfs_disk_create API we have traditionally allowed you to > set backingfile without setting backingformat. The meaning of this is > to let qemu autodetect the backing format when opening the overlay > disk. > > However libvirt >= 6.0 refuses to even pass such disks to qemu (see > https://bugzilla.redhat.com/show_bug.cgi?id=1798148).
I thought about this for a while and I think with blockdev we can securely and without data loss allow image detection of one layer and given that it doesn't support backing files (raw) or doesn't have any backing store specified use it with qemu. With such configuration it would basically allow previous semantics. The above rules combined with the fact that we can now ask qemu to refrain from opening backing files allow us to do it securely. The necessity to not have backing image is necessary to prevent any silent corruption of images. The above error will be reported in cases when libvirt can't introspect the image, e.g. when on some unknown network storage. I'll post patches next week hopefully. In such case this patch might not be necessary. _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
