From ee0a2469ebac600141c1f03c72c48d37fe488537 Mon Sep 17 00:00:00 2001 From: DanHam Date: Mon, 9 Jul 2018 12:06:45 +0100 Subject: [PATCH] Add ability to specify 'temp_path' for the build directory to VMCX builder --- builder/hyperv/vmcx/builder.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/hyperv/vmcx/builder.go b/builder/hyperv/vmcx/builder.go index 7ae54a18d..88ebef783 100644 --- a/builder/hyperv/vmcx/builder.go +++ b/builder/hyperv/vmcx/builder.go @@ -91,6 +91,7 @@ type Config struct { EnableSecureBoot bool `mapstructure:"enable_secure_boot"` SecureBootTemplate string `mapstructure:"secure_boot_template"` EnableVirtualizationExtensions bool `mapstructure:"enable_virtualization_extensions"` + TempPath string `mapstructure:"temp_path"` Communicator string `mapstructure:"communicator"` @@ -362,7 +363,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe state.Put("ui", ui) steps := []multistep.Step{ - &hypervcommon.StepCreateBuildDir{}, + &hypervcommon.StepCreateBuildDir{ + TempPath: b.config.TempPath, + }, &hypervcommon.StepOutputDir{ Force: b.config.PackerForce, Path: b.config.OutputDir,