From 044fe6064649f02dfb3969b558f58c307eddf14e Mon Sep 17 00:00:00 2001 From: Martin Pywell Date: Thu, 17 Oct 2024 21:44:44 +1100 Subject: [PATCH] common: handle default disk format `proxmox-api-go` now requires a disk format to be passed to it rather than falling back to Proxmox backend defaults when left empty. Add a default value `raw` in line with previous versions of `packer-plugin-proxmox` --- builder/proxmox/common/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/proxmox/common/config.go b/builder/proxmox/common/config.go index 2a29d944..1f88ca01 100644 --- a/builder/proxmox/common/config.go +++ b/builder/proxmox/common/config.go @@ -781,6 +781,10 @@ func (c *Config) Prepare(upper interface{}, raws ...interface{}) ([]string, []st log.Printf("Disk %d type not set, using default 'scsi'", idx) c.Disks[idx].Type = "scsi" } + if disk.DiskFormat == "" { + log.Printf("Disk %d format not set, using default 'raw'", idx) + c.Disks[idx].DiskFormat = "raw" + } if disk.Size == "" { log.Printf("Disk %d size not set, using default '20G'", idx) c.Disks[idx].Size = "20G"