Skip to content

Commit

Permalink
common: handle default disk format
Browse files Browse the repository at this point in the history
`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`
  • Loading branch information
mpywell committed Oct 17, 2024
1 parent 07788d3 commit 044fe60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builder/proxmox/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 044fe60

Please sign in to comment.