diff --git a/features.in/build-vm/lib/90-build-vm.mk b/features.in/build-vm/lib/90-build-vm.mk index 0210d811..ba4ba43f 100644 --- a/features.in/build-vm/lib/90-build-vm.mk +++ b/features.in/build-vm/lib/90-build-vm.mk @@ -33,16 +33,18 @@ prepare-image: check-sudo fi convert-image: prepare-image - @case "$(IMAGE_TYPE)" in \ + @VM_COMPRESS=; \ + case "$(IMAGE_TYPE)" in \ "img") mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; exit 0;; \ "vhd") VM_FORMAT="vpc";; \ + "qcow2c") VM_FORMAT="qcow2"; VM_COMPRESS="-c";; \ *) VM_FORMAT="$(IMAGE_TYPE)"; \ esac; \ if ! type -t qemu-img >&/dev/null; then \ echo "** error: qemu-img not available" >&2; \ exit 1; \ else \ - qemu-img convert -O "$$VM_FORMAT" \ + qemu-img convert $$VM_COMPRESS -O "$$VM_FORMAT" \ "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \ rm "$(VM_RAWDISK)"; \ if [ "0$(DEBUG)" -le 1 ]; then rm "$(VM_TARBALL)"; fi; \ diff --git a/features.in/pack/config.mk b/features.in/pack/config.mk index a70736f4..e86698d0 100644 --- a/features.in/pack/config.mk +++ b/features.in/pack/config.mk @@ -40,6 +40,6 @@ $(foreach c,$(VE_ARCHIVES), \ $(eval $(call PACK_compressors,$(c),$(z))))) # virtual machines -VM_EXTS := .img .qcow2 .vdi .vmdk .vhd +VM_EXTS := .img .qcow2 .qcow2c .vdi .vmdk .vhd $(VM_EXTS:.%=use/pack/%): use/pack; @: