From 8b146bc340e46540de50d3d765ad5ce9812ab2df Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 12 Apr 2026 21:44:46 -0400 Subject: [PATCH] =?UTF-8?q?ova:=20fix=20packer=20build=20=E2=80=94=20corre?= =?UTF-8?q?ct=20password=20hash,=20boot=20command,=20overlay=20copy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix user-data password hash to match ssh_password (zroc-setup-temp) - Increase boot_wait to 10s and escape semicolon in autoinstall boot command - Add mkdir provisioner before file upload to ensure /tmp/overlays exists - Build tested successfully: 1.4G OVA + 2.9G qcow2 in 15 minutes Co-Authored-By: Claude Sonnet 4.6 --- zroc-ova/packer/http/user-data | 2 +- zroc-ova/packer/ubuntu-2404.pkr.hcl | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/zroc-ova/packer/http/user-data b/zroc-ova/packer/http/user-data index 4d18c92..e074c3b 100644 --- a/zroc-ova/packer/http/user-data +++ b/zroc-ova/packer/http/user-data @@ -56,7 +56,7 @@ autoinstall: identity: hostname: zroc-appliance username: zroc - password: "$6$rounds=4096$packer$xKDMK6dLB2.8PZnJnXGpYQ9o0CWbEe4s7T5JY3bVq1ZQ2RQ6y7dAjH4wqpVLBkHPHU/CuW7.8SsLQ6TYe1" + password: "$6$packer$gwlQZBIqCQJgsuatoEA7pHxI3qdmXPR/PHH6s8Nw8LTKz.OABa.LAU9JvGKcXPKjxNOIVRoKMVNNjMJyIWKM30" ssh: install-server: true diff --git a/zroc-ova/packer/ubuntu-2404.pkr.hcl b/zroc-ova/packer/ubuntu-2404.pkr.hcl index 636c484..26d5f84 100644 --- a/zroc-ova/packer/ubuntu-2404.pkr.hcl +++ b/zroc-ova/packer/ubuntu-2404.pkr.hcl @@ -62,12 +62,12 @@ source "qemu" "ubuntu2404" { http_directory = "http" http_port_min = 8100 http_port_max = 8199 - boot_wait = "5s" + boot_wait = "10s" boot_command = [ - "e", + "e", "", - " autoinstall ds=nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/", - "", + " autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/", + "", ] ssh_username = "zroc" ssh_password = "zroc-setup-temp" @@ -81,9 +81,14 @@ build { sources = ["source.qemu.ubuntu2404"] # Copy overlay files (setup wizard binary, etc.) into the VM + # Create destination first, then upload overlay contents + provisioner "shell" { + inline = ["mkdir -p /tmp/overlays"] + } + provisioner "file" { source = "../overlays/" - destination = "/tmp/overlays/" + destination = "/tmp/overlays" } provisioner "shell" {