diff --git a/builder/vmware/common/step_configure_vmx.go b/builder/vmware/common/step_configure_vmx.go index 0d53c44e9..556975023 100644 --- a/builder/vmware/common/step_configure_vmx.go +++ b/builder/vmware/common/step_configure_vmx.go @@ -18,6 +18,7 @@ import ( // vmx_path string type StepConfigureVMX struct { CustomData map[string]string + SkipFloppy bool } func (s *StepConfigureVMX) Run(state multistep.StateBag) multistep.StepAction { @@ -56,12 +57,15 @@ func (s *StepConfigureVMX) Run(state multistep.StateBag) multistep.StepAction { vmxData[k] = v } - // Set a floppy disk if we have one - if floppyPathRaw, ok := state.GetOk("floppy_path"); ok { - log.Println("Floppy path present, setting in VMX") - vmxData["floppy0.present"] = "TRUE" - vmxData["floppy0.filetype"] = "file" - vmxData["floppy0.filename"] = floppyPathRaw.(string) + // Set a floppy disk, but only if we should + if ! s.SkipFloppy { + // Set a floppy disk if we have one + if floppyPathRaw, ok := state.GetOk("floppy_path"); ok { + log.Println("Floppy path present, setting in VMX") + vmxData["floppy0.present"] = "TRUE" + vmxData["floppy0.filetype"] = "file" + vmxData["floppy0.filename"] = floppyPathRaw.(string) + } } if err := WriteVMX(vmxPath, vmxData); err != nil { diff --git a/builder/vmware/iso/builder.go b/builder/vmware/iso/builder.go index ff77ef9cf..f9c752e23 100644 --- a/builder/vmware/iso/builder.go +++ b/builder/vmware/iso/builder.go @@ -369,6 +369,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &vmwcommon.StepCleanFiles{}, &vmwcommon.StepConfigureVMX{ CustomData: b.config.VMXDataPost, + SkipFloppy: true, }, &vmwcommon.StepCleanVMX{}, &vmwcommon.StepCompactDisk{ diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go index a1e7ae963..fb61b2559 100644 --- a/builder/vmware/vmx/builder.go +++ b/builder/vmware/vmx/builder.go @@ -96,6 +96,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &vmwcommon.StepCleanFiles{}, &vmwcommon.StepConfigureVMX{ CustomData: b.config.VMXDataPost, + SkipFloppy: true, }, &vmwcommon.StepCleanVMX{}, &vmwcommon.StepCompactDisk{