From 05ebc8f316e22e8b6126665d003a69cc4088f297 Mon Sep 17 00:00:00 2001 From: Shawn Neal Date: Mon, 21 Jul 2014 17:06:43 -0700 Subject: [PATCH] Do not re-add floppy disk files to VMX This commit fixes errors like this in the vsphere post-processor when using floppy files in the builder step: Error: File (/var/folders/zl/57c1vmr532z_ryf1scw53_b9ycmxh7/T/packer964492999) could not be found The configure VMX step re-adds the floppy files, so we need to configure the VMX and _then_ clean the VMX in that order. --- builder/vmware/iso/builder.go | 2 +- builder/vmware/vmx/builder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/vmware/iso/builder.go b/builder/vmware/iso/builder.go index d1f24fa64..ff77ef9cf 100644 --- a/builder/vmware/iso/builder.go +++ b/builder/vmware/iso/builder.go @@ -367,10 +367,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe Timeout: b.config.ShutdownTimeout, }, &vmwcommon.StepCleanFiles{}, - &vmwcommon.StepCleanVMX{}, &vmwcommon.StepConfigureVMX{ CustomData: b.config.VMXDataPost, }, + &vmwcommon.StepCleanVMX{}, &vmwcommon.StepCompactDisk{ Skip: b.config.SkipCompaction, }, diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go index e75f62b57..a1e7ae963 100644 --- a/builder/vmware/vmx/builder.go +++ b/builder/vmware/vmx/builder.go @@ -94,10 +94,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe Timeout: b.config.ShutdownTimeout, }, &vmwcommon.StepCleanFiles{}, - &vmwcommon.StepCleanVMX{}, &vmwcommon.StepConfigureVMX{ CustomData: b.config.VMXDataPost, }, + &vmwcommon.StepCleanVMX{}, &vmwcommon.StepCompactDisk{ Skip: b.config.SkipCompaction, },