Silence vhd-convert, tell us how long it takes

This commit is contained in:
Chiradeep Vittal 2011-01-28 17:29:37 -08:00
parent 8bcf07e6f0
commit 6074dcb999
1 changed files with 6 additions and 2 deletions

View File

@ -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"