diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go index 6d76c4537..e799efd0b 100644 --- a/builder/vmware/vmx/builder.go +++ b/builder/vmware/vmx/builder.go @@ -82,6 +82,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe }, &vmwcommon.StepCleanFiles{}, &vmwcommon.StepCleanVMX{}, + &vmwcommon.StepCompactDisk{ + Skip: b.config.SkipCompaction, + }, } // Run the steps. diff --git a/builder/vmware/vmx/config.go b/builder/vmware/vmx/config.go index 3f38dfd8c..5f68d1f42 100644 --- a/builder/vmware/vmx/config.go +++ b/builder/vmware/vmx/config.go @@ -18,8 +18,9 @@ type Config struct { vmwcommon.SSHConfig `mapstructure:",squash"` vmwcommon.VMXConfig `mapstructure:",squash"` - SourcePath string `mapstructure:"source_path"` - VMName string `mapstructure:"vm_name"` + SkipCompaction bool `mapstructure:"skip_compaction"` + SourcePath string `mapstructure:"source_path"` + VMName string `mapstructure:"vm_name"` tpl *packer.ConfigTemplate }