Browse code

Adds support for Hyper-V image formats

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

Change-Id: I9b143c9883b947397b435a671f13703f78019d23
Closes-bug: #1353726

Alessandro Pilotti authored on 2014/08/07 08:05:26
Showing 1 changed files
... ...
@@ -289,6 +289,15 @@ function upload_image {
289 289
             disk_format=iso
290 290
             container_format=bare
291 291
             ;;
292
+        *.vhd|*.vhdx|*.vhd.gz|*.vhdx.gz)
293
+            local extension="${image_fname#*.}"
294
+            image_name=$(basename "$image" ".$extension")
295
+            disk_format=vhd
296
+            container_format=bare
297
+            if [ "${image_fname##*.}" == "gz" ]; then
298
+                unpack=zcat
299
+            fi
300
+            ;;
292 301
         *) echo "Do not know what to do with $image_fname"; false;;
293 302
     esac
294 303