Skip to content

Commit

Permalink
sparsify images
Browse files Browse the repository at this point in the history
  • Loading branch information
goffinet committed Oct 21, 2024
1 parent c8c8eb0 commit 1e62057
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/push-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ if [ $disable == "true" ] ; then exit ; fi

cd ${path_image}

# rename the image by sparsify, check the size, compute md5 sha256 sum
# rename the image, check the size, compute md5 and sha1 sum

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

0 comments on commit 1e62057

Please sign in to comment.