From c8d09b5152c7269af162c441f1448e69c050c7fb Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 23 Aug 2017 13:04:42 +0200 Subject: [PATCH] Fix timestamp interpolation in created file name This commit attempts to fix the timestamp-related part of #4885 by using the logic found in the analogous virtualbox implementation. In essence, it applies the solution from commit 93bb0d8 to the vmx case. --- builder/vmware/vmx/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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