I’m no longer able to boot the iso during package building.
I don’t understand why or what’s going wrong.
2022/11/01 16:59:33 [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:33 [TRACE] discovering plugins in /usr/bin
2022/11/01 16:59:33 [TRACE] discovering plugins in /home/folaht/.config/packer/plugins
2022/11/01 16:59:33 [DEBUG] Discovered plugin: qemu = /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64
2022/11/01 16:59:34 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2022/11/01 16:59:34 [TRACE] discovering plugins in .
2022/11/01 16:59:34 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:34 [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:34 [TRACE] Starting external plugin /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 start builder -packer-default-plugin-name-
2022/11/01 16:59:34 Starting plugin: /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 []string{"/home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64", "start", "builder", "-packer-default-plugin-name-"}
2022/11/01 16:59:34 Waiting for RPC address for: /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 Plugin address: unix /tmp/packer-plugin217066219
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 Waiting for connection...
2022/11/01 16:59:34 Received unix RPC address for /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64: addr is /tmp/packer-plugin217066219
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 Serving a plugin connection...
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 [TRACE] starting builder -packer-default-plugin-name-
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 use specified accelerator: kvm
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-provisioner-file
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-file"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-provisioner-file plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-provisioner-file plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-provisioner-file plugin: args: []string{"packer-provisioner-file"}
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin762816341
2022/11/01 16:59:35 packer-provisioner-file plugin: Plugin address: unix /tmp/packer-plugin762816341
2022/11/01 16:59:35 packer-provisioner-file plugin: Waiting for connection...
2022/11/01 16:59:35 packer-provisioner-file plugin: Serving a plugin connection...
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-provisioner-shell
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2022/11/01 16:59:35 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin2336690958
2022/11/01 16:59:35 packer-provisioner-shell plugin: Waiting for connection...
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin2336690958
2022/11/01 16:59:35 packer-provisioner-shell plugin: Serving a plugin connection...
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-provisioner-shell
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin3775958636
2022/11/01 16:59:35 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin3775958636
2022/11/01 16:59:35 packer-provisioner-shell plugin: Waiting for connection...
2022/11/01 16:59:35 packer-provisioner-shell plugin: Serving a plugin connection...
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-post-processor-vagrant
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-post-processor-vagrant"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: args: []string{"packer-post-processor-vagrant"}
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin206383638
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: Plugin address: unix /tmp/packer-plugin206383638
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: Waiting for connection...
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: Serving a plugin connection...
2022/11/01 16:59:35 Build debug mode: false
2022/11/01 16:59:35 Force build: false
2022/11/01 16:59:35 On error:
2022/11/01 16:59:35 Waiting on builds to complete...
2022/11/01 16:59:35 Starting build run: manjaro-arm-installer.qemu.main
2022/11/01 16:59:35 Running builder:
2022/11/01 16:59:35 [INFO] (telemetry) Starting builder qemu.main
manjaro-arm-installer.qemu.main: output will be in this color.
2022/11/01 16:59:35 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:35 Qemu path: /usr/bin/qemu-system-x86_64, Qemu Image path: /usr/bin/qemu-img
==> manjaro-arm-installer.qemu.main: Retrieving ISO
2022/11/01 16:59:35 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:35 Acquiring lock for: https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz?checksum=sha1%3A2f5cdb891a474d4e4d1f44618bde0da90b6eb186 (/home/folaht/mai-box/mai-base/packer_cache/d6cbb63d7c8a46d7421e8ac4e7d643d9cbaceb1d.iso.lock)
==> manjaro-arm-installer.qemu.main: Trying https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz
==> manjaro-arm-installer.qemu.main: Trying https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz?checksum=sha1%3A2f5cdb891a474d4e4d1f44618bde0da90b6eb186
manjaro-arm-installer.qemu.main: Manjaro-ARM-minimal-generic-22.10.img.xz 360.93 MiB / 360.93 MiB [====================] 100.00% 1m51s
2022/11/01 17:01:27 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:01:27 closing
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Leaving retrieve loop for ISO
==> manjaro-arm-installer.qemu.main: https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz?checksum=sha1%3A2f5cdb891a474d4e4d1f44618bde0da90b6eb186 => /home/folaht/mai-box/mai-base/packer_cache/d6cbb63d7c8a46d7421e8ac4e7d643d9cbaceb1d.iso
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 No floppy files specified. Floppy disk will not be made.
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 No CD files specified. CD disk will not be made.
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 [INFO] Creating disk with Path: output/manjaro-arm-installer.qcow2 and Size: 4096M
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Executing qemu-img: []string{"create", "-f", "qcow2", "output/manjaro-arm-installer.qcow2", "4096M"}
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 stdout: Formatting 'output/manjaro-arm-installer.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=4294967296 lazy_refcounts=off refcount_bits=16
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 stderr:
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available port: 8011 on IP: 0.0.0.0
==> manjaro-arm-installer.qemu.main: Starting HTTP server on port 8011
==> manjaro-arm-installer.qemu.main: Found port for communicator (SSH, WinRM, etc): 4437.
==> manjaro-arm-installer.qemu.main: Looking for available port between 5910 and 5910 on 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 4444
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available port: 4437 on IP: 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Looking for available port between 5910 and 5910 on 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available port: 5910 on IP: 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available VNC port: 5910 on IP: 127.0.0.1
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Qemu --version output: QEMU emulator version 7.1.0
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Qemu version: 7.1.0
==> manjaro-arm-installer.qemu.main: Starting VM, booting from CD-ROM
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Qemu Builder has no floppy files, not attaching a floppy.
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Executing /usr/bin/qemu-system-x86_64: []string{"-m", "2048M", "-device", "virtio-net,netdev=user.0", "-netdev", "user,id=user.0,hostfwd=tcp::4437-:22", "-vnc", "127.0.0.1:10", "-boot", "once=d", "-machine", "type=pc,accel=kvm", "-display", "gtk", "-drive", "file=output/manjaro-arm-installer.qcow2,if=virtio,cache=writeback,discard=ignore,format=qcow2", "-drive", "file=/home/folaht/mai-box/mai-baiso_version=22.10
2022/11/01 16:59:33 [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:33 [TRACE] discovering plugins in /usr/bin
2022/11/01 16:59:33 [TRACE] discovering plugins in /home/folaht/.config/packer/plugins
2022/11/01 16:59:33 [DEBUG] Discovered plugin: qemu = /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64
2022/11/01 16:59:34 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2022/11/01 16:59:34 [TRACE] discovering plugins in .
2022/11/01 16:59:34 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:34 [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:34 [TRACE] Starting external plugin /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 start builder -packer-default-plugin-name-
2022/11/01 16:59:34 Starting plugin: /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 []string{"/home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64", "start", "builder", "-packer-default-plugin-name-"}
2022/11/01 16:59:34 Waiting for RPC address for: /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 Plugin address: unix /tmp/packer-plugin217066219
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 Waiting for connection...
2022/11/01 16:59:34 Received unix RPC address for /home/folaht/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.0_x5.0_linux_amd64: addr is /tmp/packer-plugin217066219
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 Serving a plugin connection...
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 [TRACE] starting builder -packer-default-plugin-name-
2022/11/01 16:59:34 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:34 use specified accelerator: kvm
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-provisioner-file
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-file"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-provisioner-file plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-provisioner-file plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-provisioner-file plugin: args: []string{"packer-provisioner-file"}
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin762816341
2022/11/01 16:59:35 packer-provisioner-file plugin: Plugin address: unix /tmp/packer-plugin762816341
2022/11/01 16:59:35 packer-provisioner-file plugin: Waiting for connection...
2022/11/01 16:59:35 packer-provisioner-file plugin: Serving a plugin connection...
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-provisioner-shell
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2022/11/01 16:59:35 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin2336690958
2022/11/01 16:59:35 packer-provisioner-shell plugin: Waiting for connection...
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin2336690958
2022/11/01 16:59:35 packer-provisioner-shell plugin: Serving a plugin connection...
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-provisioner-shell
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-provisioner-shell plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin3775958636
2022/11/01 16:59:35 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin3775958636
2022/11/01 16:59:35 packer-provisioner-shell plugin: Waiting for connection...
2022/11/01 16:59:35 packer-provisioner-shell plugin: Serving a plugin connection...
2022/11/01 16:59:35 [TRACE] Starting internal plugin packer-post-processor-vagrant
2022/11/01 16:59:35 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-post-processor-vagrant"}
2022/11/01 16:59:35 Waiting for RPC address for: /usr/bin/packer
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: [INFO] Packer version: 1.8.3 [go1.19 linux amd64]
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/folaht/.config/packer/packerconfig
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: [INFO] Setting cache directory: /home/folaht/.cache/packer
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: args: []string{"packer-post-processor-vagrant"}
2022/11/01 16:59:35 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin206383638
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: Plugin address: unix /tmp/packer-plugin206383638
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: Waiting for connection...
2022/11/01 16:59:35 packer-post-processor-vagrant plugin: Serving a plugin connection...
2022/11/01 16:59:35 Build debug mode: false
2022/11/01 16:59:35 Force build: false
2022/11/01 16:59:35 On error:
2022/11/01 16:59:35 Waiting on builds to complete...
2022/11/01 16:59:35 Starting build run: manjaro-arm-installer.qemu.main
2022/11/01 16:59:35 Running builder:
2022/11/01 16:59:35 [INFO] (telemetry) Starting builder qemu.main
manjaro-arm-installer.qemu.main: output will be in this color.
2022/11/01 16:59:35 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:35 Qemu path: /usr/bin/qemu-system-x86_64, Qemu Image path: /usr/bin/qemu-img
==> manjaro-arm-installer.qemu.main: Retrieving ISO
2022/11/01 16:59:35 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 16:59:35 Acquiring lock for: https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz?checksum=sha1%3A2f5cdb891a474d4e4d1f44618bde0da90b6eb186 (/home/folaht/mai-box/mai-base/packer_cache/d6cbb63d7c8a46d7421e8ac4e7d643d9cbaceb1d.iso.lock)
==> manjaro-arm-installer.qemu.main: Trying https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz
==> manjaro-arm-installer.qemu.main: Trying https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz?checksum=sha1%3A2f5cdb891a474d4e4d1f44618bde0da90b6eb186
manjaro-arm-installer.qemu.main: Manjaro-ARM-minimal-generic-22.10.img.xz 360.93 MiB / 360.93 MiB [====================] 100.00% 1m51s
2022/11/01 17:01:27 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:01:27 closing
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Leaving retrieve loop for ISO
==> manjaro-arm-installer.qemu.main: https://github.com/manjaro-arm/generic-images/releases/download/22.10/Manjaro-ARM-minimal-generic-22.10.img.xz?checksum=sha1%3A2f5cdb891a474d4e4d1f44618bde0da90b6eb186 => /home/folaht/mai-box/mai-base/packer_cache/d6cbb63d7c8a46d7421e8ac4e7d643d9cbaceb1d.iso
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 No floppy files specified. Floppy disk will not be made.
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 No CD files specified. CD disk will not be made.
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 [INFO] Creating disk with Path: output/manjaro-arm-installer.qcow2 and Size: 4096M
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Executing qemu-img: []string{"create", "-f", "qcow2", "output/manjaro-arm-installer.qcow2", "4096M"}
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 stdout: Formatting 'output/manjaro-arm-installer.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=4294967296 lazy_refcounts=off refcount_bits=16
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 stderr:
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available port: 8011 on IP: 0.0.0.0
==> manjaro-arm-installer.qemu.main: Starting HTTP server on port 8011
==> manjaro-arm-installer.qemu.main: Found port for communicator (SSH, WinRM, etc): 4437.
==> manjaro-arm-installer.qemu.main: Looking for available port between 5910 and 5910 on 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 4444
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available port: 4437 on IP: 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Looking for available port between 5910 and 5910 on 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available port: 5910 on IP: 127.0.0.1
2022/11/01 17:08:32 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:32 Found available VNC port: 5910 on IP: 127.0.0.1
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Qemu --version output: QEMU emulator version 7.1.0
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Qemu version: 7.1.0
==> manjaro-arm-installer.qemu.main: Starting VM, booting from CD-ROM
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Qemu Builder has no floppy files, not attaching a floppy.
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Executing /usr/bin/qemu-system-x86_64: []string{"-m", "2048M", "-device", "virtio-net,netdev=user.0", "-netdev", "user,id=user.0,hostfwd=tcp::4437-:22", "-vnc", "127.0.0.1:10", "-boot", "once=d", "-machine", "type=pc,accel=kvm", "-display", "gtk", "-drive", "file=output/manjaro-arm-installer.qcow2,if=virtio,cache=writeback,discard=ignore,format=qcow2", "-drive", "file=/home/folaht/mai-box/mai-base/packer_cache/d6cbb63d7c8a46d7421e8ac4e7d643d9cbaceb1d.iso,media=cdrom", "-name", "manjaro-arm-installer.qcow2"}
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Started Qemu. Pid: 1160686se/packer_cache/d6cbb63d7c8a46d7421e8ac4e7d643d9cbaceb1d.iso,media=cdrom", "-name", "manjaro-arm-installer.qcow2"}
2022/11/01 17:08:33 packer-plugin-qemu_v1.0.0_x5.0_linux_amd64 plugin: 2022/11/01 17:08:33 Started Qemu. Pid: 1160686
variable "country" {
type = string
default = "NL"
validation {
condition = length(var.country) == 2
error_message = "The country value must be two characters long."
}
}
variable "headless" {
type = bool
default = false
validation {
condition = can(var.headless)
error_message = "The headless value must exist."
}
}
variable "ssh_timeout" {
type = string
default = "20m"
validation {
condition = can(regex("[0-9]+[smh]", var.ssh_timeout))
error_message = "The ssh_timeout value must be a number followed by the letter s(econds), m(inutes), or h(ours)."
}
}
variable "write_zeros" {
type = string
default = true
validation {
condition = can(var.write_zeros)
error_message = "The write_zeros value must exist."
}
}
variable "iso_version" {
type = string
default = "22.08"
validation {
condition = can(regex("[0-9]+[.][0-9]+", var.iso_version))
error_message = "The iso_version value must be a valid semver x.x ."
}
}
locals {
boot_command_qemu = [
"<enter><wait45><wait45>",
"<leftCtrlOn><leftAltOn><f2><leftCtrlOff><leftAltOff><wait10>",
"manjaro<enter><wait2>",
"manjaro<enter><wait2>",
"su -<enter><wait3>",
"manjaro<enter><wait2>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait3>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait3>",
"/usr/bin/bash ./enable-ssh.sh<enter><wait15>",
]
boot_command_virtualbox = [
"<enter><wait90><wait90>",
"<leftCtrlOn><leftAltOn><f2><leftCtrlOff><leftAltOff><wait10>",
"manjaro<enter><wait2>",
"manjaro<enter><wait2>",
"su -<enter><wait3>",
"manjaro<enter><wait2>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh<enter><wait3>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer<enter><wait3>",
"/usr/bin/bash ./enable-ssh.sh<enter><wait15>",
]
iso_checksum = "https://github.com/manjaro-arm/generic-images/releases/download/${var.iso_version}/Manjaro-ARM-minimal-generic-${var.iso_version}.img.xz.sha1"
iso_url = "https://github.com/manjaro-arm/generic-images/releases/download/${var.iso_version}/Manjaro-ARM-minimal-generic-${var.iso_version}.img.xz"
name = "manjaro-arm-installer"
vm_name = "manjaro-arm-installer"
}
source "qemu" "main" {
accelerator = "kvm"
boot_command = "${local.boot_command_qemu}"
boot_wait = "2s"
communicator = "ssh"
cpus = 1
disk_interface = "virtio"
disk_size = 4096
format = "qcow2"
headless = "${var.headless}"
http_directory = "srv"
iso_checksum = "file:${local.iso_checksum}"
iso_url = "${local.iso_url}"
memory = 2048
net_device = "virtio-net"
output_directory = "output"
shutdown_command = "sudo systemctl start poweroff.timer"
ssh_username = "vagrant"
ssh_password = "vagrant"
ssh_port = 22
ssh_timeout = "${var.ssh_timeout}"
vm_name = "${local.vm_name}.qcow2"
vnc_port_max = 5910
vnc_port_min = 5910
}
build {
name = "manjaro-arm-installer"
sources = ["source.qemu.main"]
provisioner "file" {
destination = "/tmp/"
source = "./files"
}
provisioner "shell" {
only = ["qemu.main"]
execute_command = "{{ .Vars }} COUNTRY=${var.country} sudo -E -S bash '{{ .Path }}'"
expect_disconnect = true
script = "scripts/install-base-ext4-mbr-lbios.sh"
}
provisioner "shell" {
execute_command = "{{ .Vars }} WRITE_ZEROS=${var.write_zeros} sudo -E -S bash '{{ .Path }}'"
script = "scripts/cleanup.sh"
}
post-processor "vagrant" {
keep_input_artifact = true
output = "output/${local.vm_name}_${source.type}_${source.name}-${formatdate("YYYY-MM", timestamp())}.box"
vagrantfile_template = "templates/vagrantfile.tpl"
}
}