From 10df63790d6a74d9ba1ee608669ebedd303898de Mon Sep 17 00:00:00 2001 From: fxi Date: Mon, 10 Jun 2024 15:19:59 +0200 Subject: [PATCH] Packer ci : try to solve 'Error reading version for metadata upload:' --- packer/alpine.pkr.hcl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packer/alpine.pkr.hcl b/packer/alpine.pkr.hcl index 523b206e..be3e9a6f 100644 --- a/packer/alpine.pkr.hcl +++ b/packer/alpine.pkr.hcl @@ -35,6 +35,12 @@ variable "vm_version" { default = "5.8" } +# vm_description +variable "vm_description" { + type = string + default = "AccessMod VirtualBox VM" +} + variable "repo" { type = string default = "fredmoser/accessmod" @@ -146,7 +152,6 @@ source "virtualbox-iso" "accessmod" { "umount /mnt", "reboot", ] - vm_name = "${var.vm_name}-${var.vm_version}" boot_wait = "10s" disk_size = "${var.disk_size}" guest_os_type = "Linux_64" @@ -157,7 +162,14 @@ source "virtualbox-iso" "accessmod" { ssh_handshake_attempts = "20" ssh_port = "${var.port_ssh_public}" ssh_agent_auth = false + vm_name = "${var.vm_name}-${var.vm_version}" format = "ova" + export_opts = [ + "--manifest", + "--vsys", "0", + "--description", "${var.vm_description}", + "--version", "${var.vm_version}" + ] headless = true vrdp_bind_address = "127.0.0.1" skip_nat_mapping = true