I have a packer file which I use to create Alma and RHEL templates on Proxmox 8.3.0 (see below).
When using the Proxmox plugin version 1.1.8 it works perfectly, but I wanted to upgrade the plugin to version 1.2.2. But some of the parameter have now changed, but I’m unable to get it to boot without a kernel crash.
My original code is
packer {
required_plugins {
proxmox = {
# https://developer.hashicorp.com/packer/integrations/hashicorp/proxmox
version = "= 1.1.8"
source = "github.com/hashicorp/proxmox"
}
}
}
variable "proxmox_url" {
type = string
}
variable "proxmox_user" {
type = string
}
variable "proxmox_token" {
type = string
}
variable "ansible_password" {
type = string
}
locals {
timestamp = timestamp()
}
source "proxmox-iso" "almalinux9-tpl" {
node = "proxmox"
proxmox_url = var.proxmox_url
insecure_skip_tls_verify = true
# next 3 lines needed by 1.1.8 plugin but not 1.2.2
iso_file = "local:iso/AlmaLinux-9.5-x86_64-dvd.iso"
iso_checksum = "sha256:3947accd140a2a1833b1ef2c811f8c0d48cd27624cad343992f86cfabd2474c9"
unmount_iso = true
#
vm_name = "template-alma95-creating"
template_name = "template-alma95"
template_description = "${local.timestamp}"
username = var.proxmox_user
token = var.proxmox_token
cpu_type = "host"
cores = "2"
memory = "2048"
disks {
disk_size = "60G"
storage_pool = "local-lvm"
type = "virtio"
format = "raw"
}
network_adapters {
bridge = "vmbr0"
}
ssh_username = "ansible"
ssh_password = var.ansible_password
ssh_timeout = "30m"
ssh_handshake_attempts= "100"
additional_iso_files {
cd_files = ["ks.cfg"]
cd_label = "cidata"
iso_storage_pool = "local"
unmount = true
}
boot_command = [ "I", "<tab><end><wait5>",
" ip=dhcp",
" inst.cmdline",
" inst.ks=cdrom:/ks.cfg",
"<wait10><enter>"]
boot_wait = "20s"
tags = "alma95"
}
build {
name = "alma9-${ formatdate("YYYYMMDDhhmm", local.timestamp) }"
sources = ["source.proxmox-iso.almalinux9-tpl"]
}
If I replace the relevant lines of code with
diff testcase-1.1.8-working.pkr.hcl testcase-1.2.2-nonworking.pkr.hcl
5c5
< version = "= 1.1.8"
---
> version = ">= 1.2.2"
36,39c36,41
< # next 3 lines needed by 1.1.8 plugin but not 1.2.2
< iso_file = "local:iso/AlmaLinux-9.5-x86_64-dvd.iso"
< iso_checksum = "sha256:3947accd140a2a1833b1ef2c811f8c0d48cd27624cad343992f86cfabd2474c9"
< unmount_iso = true
---
> # next 5 lines needed for 1.2.2 plugin but not 1.1.8
> boot_iso {
> iso_file = "local:iso/AlmaLinux-9.5-x86_64-dvd.iso"
> iso_checksum = "sha256:3947accd140a2a1833b1ef2c811f8c0d48cd27624cad343992f86cfabd2474c9"
> unmount = true
> }
I get a kernel panic
any ideas?
Thanks
Steve