Skip to content

Commit 1e62057

Browse files
committed
sparsify images
1 parent c8c8eb0 commit 1e62057

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/push-image.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ if [ $disable == "true" ] ; then exit ; fi
2424

2525
cd ${path_image}
2626

27-
# rename the image by sparsify, check the size, compute md5 sha256 sum
27+
# rename the image, check the size, compute md5 and sha1 sum
2828

29-
virt-sparsify --check-tmpdir ignore --compress --convert qcow2 --format packer-${image} ${image}.qcow2
29+
mv packer-${image} ${image}.qcow2.temp
30+
virt-sparsify --check-tmpdir ignore --compress --convert qcow2 --format qcow2 ${image}.qcow2.temp ${image}.qcow2
3031
md5sum_image=$(md5sum ${image}.qcow2 | cut -d' ' -f1)
3132
size_image=$(stat -c %s ${image}.qcow2)
3233
md5sum ${image}.qcow2 > ${image}.qcow2.md5sum

0 commit comments

Comments
 (0)