diff --git a/builder/proxmox/common/step_start_vm.go b/builder/proxmox/common/step_start_vm.go index 42cf8118..b1df9346 100644 --- a/builder/proxmox/common/step_start_vm.go +++ b/builder/proxmox/common/step_start_vm.go @@ -317,6 +317,7 @@ func generateProxmoxDisks(disks []diskConfig) *proxmox.QemuStorages { EmulateSSD: disks[idx].SSD, }, } + // set value of &ideDisks.Disk_ to contents of &dev reflect.ValueOf(&ideDisks).Elem().FieldByIndex([]int{ideCount}).Set(reflect.ValueOf(&dev)) ideCount++ case "scsi": @@ -331,6 +332,7 @@ func generateProxmoxDisks(disks []diskConfig) *proxmox.QemuStorages { IOThread: disks[idx].IOThread, }, } + // set value of &scsiDisks.Disk_ to contents of &dev reflect.ValueOf(&scsiDisks).Elem().FieldByIndex([]int{scsiCount}).Set(reflect.ValueOf(&dev)) scsiCount++ case "sata": @@ -344,6 +346,7 @@ func generateProxmoxDisks(disks []diskConfig) *proxmox.QemuStorages { EmulateSSD: disks[idx].SSD, }, } + // set value of &sataDisks.Disk_ to contents of &dev reflect.ValueOf(&sataDisks).Elem().FieldByIndex([]int{sataCount}).Set(reflect.ValueOf(&dev)) sataCount++ case "virtio": @@ -357,6 +360,7 @@ func generateProxmoxDisks(disks []diskConfig) *proxmox.QemuStorages { IOThread: disks[idx].IOThread, }, } + // set value of &virtIODisks.Disk_ to contents of &dev reflect.ValueOf(&virtIODisks).Elem().FieldByIndex([]int{virtIOCount}).Set(reflect.ValueOf(&dev)) virtIOCount++ }