Adds support for Hyper-V image formats

Adds support for VHD and VHDX image formats, including gz compression.

Change-Id: I9b143c9883b947397b435a671f13703f78019d23
Closes-bug: #1353726
This commit is contained in:
Alessandro Pilotti 2014-08-07 02:05:26 +03:00
parent d8baf23634
commit ca8239449f
1 changed files with 9 additions and 0 deletions

View File

@ -289,6 +289,15 @@ function upload_image {
disk_format=iso
container_format=bare
;;
*.vhd|*.vhdx|*.vhd.gz|*.vhdx.gz)
local extension="${image_fname#*.}"
image_name=$(basename "$image" ".$extension")
disk_format=vhd
container_format=bare
if [ "${image_fname##*.}" == "gz" ]; then
unpack=zcat
fi
;;
*) echo "Do not know what to do with $image_fname"; false;;
esac