Add qemu builder

This commit adds support for QEMU
This commit is contained in:
Jan Dittberner 2020-03-01 22:54:32 +01:00
parent 5b4dd18d7c
commit c7ee084eb8
5 changed files with 232 additions and 52 deletions

View file

@ -2,6 +2,18 @@
set -e
case "$PACKER_BUILDER_TYPE" in
virtualbox-iso)
DEVICE=/dev/sda
;;
qemu)
DEVICE=/dev/vda
;;
*)
echo "Unsupported packer build $PACKER_BUILDER_TYPE" >&2
exit 1
esac
echo "
d
3
@ -14,5 +26,5 @@ n
p
w" | /sbin/fdisk /dev/sda || true
w" | /sbin/fdisk "$DEVICE" || true
/sbin/partprobe