Proxmox-builder pass through boot-order
Adding the boot field supported by Proxmox api and proxmox-api-go library. This is due to a change in Proxmox to allow for multiple boot harddrives which would break the packer proxmox builder (the hardcoded cdn boot value). Can be specified like the following example: "disks": [ { "type": "scsi", "disk_size": "20G", "storage_pool": "vmstorage", "storage_pool_type": "lvm" } ], "boot": "order=scsi0;ide2", "iso_file": "media:iso/{{ user `ubuntu_iso_file` }}" Not sure this is ideal, but it's a workaround for the #10252 issue.
This commit is contained in:
parent
6871a3a85d
commit
2bdfd53756
|
@ -39,6 +39,7 @@ type Config struct {
|
|||
VMName string `mapstructure:"vm_name"`
|
||||
VMID int `mapstructure:"vm_id"`
|
||||
|
||||
Boot string `mapstructure:"boot"`
|
||||
Memory int `mapstructure:"memory"`
|
||||
Cores int `mapstructure:"cores"`
|
||||
CPUType string `mapstructure:"cpu_type"`
|
||||
|
|
|
@ -43,7 +43,7 @@ func (s *stepStartVM) Run(ctx context.Context, state multistep.StateBag) multist
|
|||
Name: c.VMName,
|
||||
Agent: agent,
|
||||
QemuKVM: kvm,
|
||||
Boot: "cdn", // Boot priority, c:CDROM -> d:Disk -> n:Network
|
||||
Boot: c.Boot, // Boot priority, example: "order=virtio0;ide2;net0", virtio0:Disk0 -> ide0:CDROM -> net0:Network
|
||||
QemuCpu: c.CPUType,
|
||||
Description: "Packer ephemeral build VM",
|
||||
Memory: c.Memory,
|
||||
|
|
Loading…
Reference in New Issue