Browse Source

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
John Zimmermann 4 years ago
parent
commit
48ba5d61b2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packer/hcl2/source-qemu.pkr.hcl

+ 2 - 1
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"
 }