--- a/lib/img-functions +++ b/lib/img-functions @@ -119,2 +119,9 @@ mv $TMP_IMAGE_PATH $1-new + elif [ "$IMAGE_TYPE" == "vhd" ]; then + cp $TMP_IMAGE_PATH $1-intermediate + vhd-util convert -s 0 -t 1 -i $1-intermediate -o $1-intermediate + vhd-util convert -s 1 -t 2 -i $1-intermediate -o $1-new + # The previous command creates a .bak file + rm $1-intermediate.bak + OUT_IMAGE_PATH=$1-new else