Description of problem:
qemu-img 2.10 provides now new "measure" command for estimating the size of an
image, when converting images between formats.
See bug 1433670 for details.
Vdsm already includes some of the features provided now by qemu-img measure,
Author: Maor Lipchuk <firstname.lastname@example.org>
Date: Mon Feb 20 13:30:57 2017 +0200
qcow2: Calculate estimated size for converted qcow volumes.
Adding a utility module for estimating qcow2 file size once
converted from raw to qcow2.
The estimation takes in consider also the qcow header size
based on the implementation being done in qemu block/qcow2.c
The following is a test being done on a 10GB QCOW volume
with compatibility of 1.1.
The actual size of the disk after executing qemu-convert was 1.00036621
GB, while the estimated size by the new function was 1.00177 GB
Signed-off-by: Maor Lipchuk <email@example.com>
Same code is used also for estimating conversion from qcow2 to qcow2 format,
Author: Nir Soffer <firstname.lastname@example.org>
Date: Thu Sep 21 15:30:32 2017 +0300
qcow2: Support compressed qcow2 uploads
If a compressed qcow2 image is uploaded, copying the image to block
storage is likely to fail, because we used the source image size for
allocating the destination image.
This patch enables qcow2 source image in qcow2.estimate_size() and use
it to estimate the destination file size when copying qcow2 image to
another storage domain.
Signed-off-by: Nir Soffer <email@example.com>
We want to drop the vdsm code and use instead qemu-img messure.
This has several advantages:
- No need to maintain and port the code to python 3
- correctness and robustness, qemu-img measure will not break when qcow2 format
- qemu-img measure is more efficient, current vdsm code is calling qemu-img map
generating possibly huge json for very sparse images.
- being able to use additional features provided by qemu-img measure
- Add qemuimg.measure() function calling qemu-img measure
- Use the new function when we use now storage.qcow2.estimate_size()
- remove storage.qcow2 module and its tests
@Dan - didn't mean to assign this to you, that was a stupid BZ race.
Sorry for the noise.
Can you please provide steps to reproduce or how/what exactly to test here.
There is none.
Just verify that there are no regressions, mainly around copying images/chain (create template/clone/copy disk).
(In reply to Eyal Shenitzky from comment #3)
> There is none.
> Just verify that there are no regressions, mainly around copying
> images/chain (create template/clone/copy disk).
with qcow2 disks.
No regressions related to this were found.
Currently, moving to VERIFIED.
Last execution envrinoment:
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.
Since the problem described in this bug report should be
resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.