Hi Jonathan, On Thursday, 26 September 2019 16:29:46 CEST Jonathan Wright wrote: > virt-sparsify: error: libguestfs error: discard cannot be enabled on this > drive: qemu does not support discard for '*parallels*' format files Correct, this is because we have the following function to determine whether it is supported: https://github.com/libguestfs/libguestfs/blob/02890096d55eaee66c1e6ed34fc9b235cc64ebd3/lib/qemu.c#L972 In a nutshell: - raw supported with qemu >= 1.5 - qcow2 supported with qemu >= 1.6 - any other format is not supported So we check based on the version of qemu currently. > Since Virtuozzo 7.0.11 discard is officially supported for ploop images > and I've mounted them with discard and confirmed this functionality > works as expected. Would it be possible to update libguestfs to be > aware of this support so the --inplace flag will work? > > https://virtuozzosupport.force.com/s/article/VZA-2019-059 This leads me to the question: how can libguestfs detect this? Ideally we would check somehow, and show the error message only when not supported. Otherwise the alternative is simply unconditionally enable discard for "parallels" disk images, although I don't know what would happen when using versions of Virtuozzo older than 7.0.11. Any Virtuozzo guy that can provide more insight? -- Pino Toscano
Description: This is a digitally signed message part.