diff --git a/CHANGELOG.md b/CHANGELOG.md index 003a6cf9f..6110a91d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ * provisioner/salt-masterless: Also use sudo to clean up if we used sudo to install. [GH-5240] * builder/profitbricks: added support for Cloud API v4. [GH-5233] +### BUG FIXES: + +* builder/vmware: Fix timestamp in default VMName. [GH-5274] + ## 1.0.4 (August 11, 2017) diff --git a/builder/vmware/iso/step_export.go b/builder/vmware/iso/step_export.go index 3d055ddb4..c0d39c76f 100644 --- a/builder/vmware/iso/step_export.go +++ b/builder/vmware/iso/step_export.go @@ -45,6 +45,7 @@ func (s *StepExport) Run(state multistep.StateBag) multistep.StepAction { } if c.RemoteType != "esx5" || s.Format == "" { + ui.Say("Skipping export of virtual machine (export is allowed only for ESXi and the format needs to be specified)...") return multistep.ActionContinue } diff --git a/builder/vmware/vmx/config.go b/builder/vmware/vmx/config.go index 93e8347c6..145705fd7 100644 --- a/builder/vmware/vmx/config.go +++ b/builder/vmware/vmx/config.go @@ -51,7 +51,8 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { // Defaults if c.VMName == "" { - c.VMName = fmt.Sprintf("packer-%s-{{timestamp}}", c.PackerBuildName) + c.VMName = fmt.Sprintf( + "packer-%s-%d", c.PackerBuildName, interpolate.InitTime.Unix()) } // Prepare the errors diff --git a/website/source/docs/builders/vmware-iso.html.md b/website/source/docs/builders/vmware-iso.html.md index 478c1a0b0..4d00965b7 100644 --- a/website/source/docs/builders/vmware-iso.html.md +++ b/website/source/docs/builders/vmware-iso.html.md @@ -478,7 +478,8 @@ modify as well: - `format` (string) - Either "ovf", "ova" or "vmx", this specifies the output format of the exported virtual machine. This defaults to "ovf". - Before using this option, you need to install `ovftool`. + Before using this option, you need to install `ovftool`. This option + works currently only with option remote_type set to "esx5". ### VNC port discovery