diff --git a/builder/vmware/step_clean_vmx.go b/builder/vmware/step_clean_vmx.go index c8a66c5e0..a40855d41 100644 --- a/builder/vmware/step_clean_vmx.go +++ b/builder/vmware/step_clean_vmx.go @@ -55,12 +55,12 @@ func (s stepCleanVMX) Run(state multistep.StateBag) multistep.StepAction { continue } - filenameKey := match + ".filename" + filenameKey := match + "filename" if filename, ok := vmxData[filenameKey]; ok { if filename == isoPath { // Change the CD-ROM device back to auto-detect to eject vmxData[filenameKey] = "auto detect" - vmxData[match+".devicetype"] = "cdrom-raw" + vmxData[match+"devicetype"] = "cdrom-raw" } } }