Commit 0e9a8736 authored by Michael Shigorin's avatar Michael Shigorin

build-vm: avoid dummy raw2raw conversion

It's better to rather just move the raw image instead of specifically converting it into the same, and there's no need for qemu-img altogether then. Let's drop the intermediate raw image after successful conversion as well.
parent bf5fd3f5
......@@ -30,7 +30,7 @@ prepare-image: check-sudo
convert-image: prepare-image
@case "$(IMAGE_TYPE)" in \
"img") VM_FORMAT="raw";; \
"img") mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; exit 0;; \
"vhd") VM_FORMAT="vpc";; \
*) VM_FORMAT="$(IMAGE_TYPE)"; \
esac; \
......@@ -39,6 +39,7 @@ convert-image: prepare-image
else \
qemu-img convert -O "$$VM_FORMAT" \
"$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \
rm "$(VM_RAWDISK)"; \
fi
run-image-scripts: GLOBAL_ROOTPW := $(ROOTPW)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment