Skip to content

Commit 0c232fb

Browse files
VadimLaktlbajolet-hashicorp
authored andcommitted
fix for remove the old cloud-init on local disks
1 parent 32ce25b commit 0c232fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builder/proxmox/common/step_remove_cloud_init_drive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (s *stepRemoveCloudInitDrive) Run(ctx context.Context, state multistep.Stat
5353
}
5454

5555
for _, controller := range diskControllers {
56-
if vmParams[controller] != nil && strings.Contains(vmParams[controller].(string), "-cloudinit,media=cdrom") {
56+
if vmParams[controller] != nil && strings.Contains(vmParams[controller].(string), "-cloudinit") && strings.Contains(vmParams[controller].(string), ",media=cdrom") {
5757
delete = append(delete, controller)
5858
}
5959
}

0 commit comments

Comments
 (0)