Adds support for VHD and VHDX image formats, including gz compression.
Change-Id: I9b143c9883b947397b435a671f13703f78019d23
Closes-bug: #1353726
| ... | ... |
@@ -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 |
|