Added a new "temporaryDevices" key to the VMware builders' statebag in order to keep track of devices that were temporarily added during build and need to be removed later by StepCleanVMX.

This commit is contained in:
Ali Rizvi-Santiago 2018-12-03 17:43:02 -06:00
parent 6f24bc48ac
commit 27b16cee0a
2 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state.Put("ui", ui)
state.Put("sshConfig", &b.config.SSHConfig)
state.Put("driverConfig", &b.config.DriverConfig)
state.Put("temporaryDevices", []string{}) // Devices (in .vmx) created by packer during building
steps := []multistep.Step{
&vmwcommon.StepPrepareTools{

View File

@ -67,6 +67,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state.Put("ui", ui)
state.Put("sshConfig", &b.config.SSHConfig)
state.Put("driverConfig", &b.config.DriverConfig)
state.Put("temporaryDevices", []string{}) // Devices (in .vmx) created by packer during building
// Build the steps.
steps := []multistep.Step{