Support multiple outputs disk formats
Using the IMAGE_TYPE env variable, you can select which ouput disk format you want for your image. Only qcow2 format supports compression. Change-Id: Ia01d9079c354dbd3cfcf870d86f97ee57bd9d479
This commit is contained in:
parent
e4957e37a9
commit
a05629b9f4
1 changed files with 2 additions and 1 deletions
|
@ -166,7 +166,8 @@ function finalise_base () {
|
|||
|
||||
function compress_image () {
|
||||
# Recreate our image to throw away unnecessary data
|
||||
qemu-img convert ${COMPRESS_IMAGE:+-c} $TMP_IMAGE_PATH -O qcow2 $TMP_IMAGE_PATH-new
|
||||
test $IMAGE_TYPE != qcow2 && COMPRESS_IMAGE=""
|
||||
qemu-img convert ${COMPRESS_IMAGE:+-c} $TMP_IMAGE_PATH -O $IMAGE_TYPE $TMP_IMAGE_PATH-new
|
||||
rm $TMP_IMAGE_PATH
|
||||
mv $TMP_IMAGE_PATH-new $TMP_IMAGE_PATH
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue