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.
This commit is contained in:
parent
bf5fd3f54e
commit
0e9a873608
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user