Page MenuHomeVyOS Platform

Unable to build qemu image due to misconfigured Packer
Closed, InvalidPublicBUG

Description

An error occurred when building the qemu image from vyos-build, prompting:

qemu-image output will be in this color.

1 error(s) occurred:

* The iso_checksum_type must be specified.

After investigation, it may be that the scripts/packer.json file is configured incorrectly, and the ʻiso_checksum_type` parameter is missing (I don’t know if it is related to the version, this is the case for local testing)

Local packer package version: 1.3.4

The modified diff is as follows:

diff --git a/scripts/packer.json b/scripts/packer.json
index 53b6a1c..e65463e 100644
--- a/scripts/packer.json
+++ b/scripts/packer.json
@@ -2,6 +2,7 @@
   "variables": {
     "iso_url": "{{env `ISO_IMAGE`}}",
     "iso_checksum": "{{env `ISO_MD5_SUM`}}",
+    "iso_checksum_type": "md5",
     "output_directory": "{{env `PACKER_BUILD_DIR`}}"
   },
   "builders":
@@ -10,7 +11,8 @@
       "name": "qemu-image",
       "type": "qemu",
       "iso_url": "{{user `iso_url`}}",
-      "iso_checksum": "md5:{{user `iso_checksum`}}",
+      "iso_checksum_type": "{{user `iso_checksum_type`}}",
+      "iso_checksum": "{{user `iso_checksum`}}",
       "output_directory": "{{user `output_directory`}}/qemu",
       "shutdown_command": "sudo halt -p",
       "disk_size": 4096,

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

This will break builds in out Docker environment where we ship a packer version. See T2792 and https://github.com/vyos/vyos-build/commit/e2dd9db8a2539b6d13c98d89e18872336cf8f974

Must this command be executed from docker now?

erkin renamed this task from Unable to build qemu to Unable to build qemu image due to misconfigured Packer.Aug 29 2021, 12:35 PM
erkin set Issue type to Bug (incorrect behavior).
erkin removed a subscriber: Active contributors.