Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
This is my packerfile and cloud-config
Running this without debug results in silent failure of the file provisioner to upload the files correctly. This also prevents the write_files module of cloudinit from running.
Changing nothing other than adding the -debug flag causes file provisioner and cloudinit files to be written correctly.
Reproduction Steps
Running the above files using packer build . results in files either not being written to the disk image or blank files get written. Running packer -debug build . on the same directory and code results in both the file provisioner file and cloud-init file being written correctly.
MacOS 13.3.1 MacBook Air 2020 Apple M1 CPU, 8GB RAM
Log Fragments and crash.log files
No obvious errors, but this line looks strange. There's a nonzero stderr reported by SCP but no error info and build finishes successfully. Possibly relevant?
I had the same issue and found it is gone if you use "sync" as your last command before creating an image.
Probably the -debug does the same to flush after each commadn, hence it helps
Community Note
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
Overview of the Issue
This is my packerfile and cloud-config Running this without debug results in silent failure of the file provisioner to upload the files correctly. This also prevents the
write_files
module ofcloudinit
from running.Changing nothing other than adding the
-debug
flag causes file provisioner and cloudinit files to be written correctly.Reproduction Steps
Running the above files using
packer build .
results in files either not being written to the disk image or blank files get written. Runningpacker -debug build .
on the same directory and code results in both the file provisioner file and cloud-init file being written correctly.Packer version
From Packer v1.9.1
Simplified Packer Template
Link to gist containing packerfile + cloud-config files
Operating system and Environment details
MacOS 13.3.1 MacBook Air 2020 Apple M1 CPU, 8GB RAM
Log Fragments and crash.log files
No obvious errors, but this line looks strange. There's a nonzero stderr reported by SCP but no error info and build finishes successfully. Possibly relevant?
2023/06/24 19:19:22 packer-plugin-qemu_v1.0.9_x5.0_darwin_arm64 plugin: 2023/06/24 19:19:22 [DEBUG] scp stderr (length 79): Sink: C0644 3829 provisioner-install.sh