mirror of https://github.com/apache/cloudstack.git
Silence vhd-convert, tell us how long it takes
This commit is contained in:
parent
8bcf07e6f0
commit
6074dcb999
|
|
@ -1,11 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
begin=$(date +%s)
|
||||
echo "Backing up systemvm.img"
|
||||
cp systemvm.img systemvm.img.tmp
|
||||
echo "Converting raw image to fixed vhd"
|
||||
vhd-util convert -s 0 -t 1 -i systemvm.img.tmp -o systemvm.vhd
|
||||
vhd-util convert -s 0 -t 1 -i systemvm.img.tmp -o systemvm.vhd &> /dev/null
|
||||
echo "Converting fixed vhd to dynamic vhd"
|
||||
vhd-util convert -s 1 -t 2 -i systemvm.vhd -o systemvm.vhd
|
||||
vhd-util convert -s 1 -t 2 -i systemvm.vhd -o systemvm.vhd &> /dev/null
|
||||
echo "Compressing vhd..."
|
||||
bzip2 -c systemvm.vhd > systemvm.vhd.bz2
|
||||
echo "Done VHD"
|
||||
|
|
@ -37,3 +38,6 @@ md5sum systemvm.vhd.bz2 >> md5sum
|
|||
md5sum systemvm.qcow2 >> md5sum
|
||||
md5sum systemvm.qcow2.bz2 >> md5sum
|
||||
md5sum systemvm.ova >> md5sum
|
||||
fin=$(date +%s)
|
||||
t=$((fin-begin))
|
||||
echo "Finished compressing/converting image in $t seconds"
|
||||
|
|
|
|||
Loading…
Reference in New Issue