From 48ba5d61b2c0b0f9cc3ca0f01930e8291da13f0b Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Sun, 16 May 2021 21:24:17 +0200 Subject: [PATCH] packer: increase qemu disk size, set shutdown command the build runs out of space with only 1G, furthermore it was doing a hard reset without any sync, so many files touched in the cloud.sh script were empty on the image --- packer/hcl2/source-qemu.pkr.hcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packer/hcl2/source-qemu.pkr.hcl b/packer/hcl2/source-qemu.pkr.hcl index 62eef44..46fb062 100644 --- a/packer/hcl2/source-qemu.pkr.hcl +++ b/packer/hcl2/source-qemu.pkr.hcl @@ -2,7 +2,7 @@ source "qemu" "x86_64" { accelerator = "kvm" boot_wait = "5s" disk_interface = "virtio" - disk_size = "1000M" + disk_size = "2000M" format = "qcow2" http_directory = "http" iso_checksum = "sha256:d95d40e1eb13a7776b5319a05660792fddd762662eaecee5df6b8feb3aa9b391" @@ -10,4 +10,5 @@ source "qemu" "x86_64" { ssh_password = "void" ssh_timeout = "20m" ssh_username = "void" + shutdown_command = "echo 'void' | sudo -S shutdown -P now" }