From f9f47c5bbba520e550c39d7039ca39806e4f49ad Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Fri, 21 Oct 2016 22:26:34 -0700 Subject: [PATCH] fix shell disconnect error when shutting down vmware --- builder/vmware/common/step_shutdown.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/vmware/common/step_shutdown.go b/builder/vmware/common/step_shutdown.go index 5aad45fd0..7ff443152 100644 --- a/builder/vmware/common/step_shutdown.go +++ b/builder/vmware/common/step_shutdown.go @@ -61,7 +61,8 @@ func (s *StepShutdown) Run(state multistep.StateBag) multistep.StepAction { cmd.Wait() // If the command failed to run, notify the user in some way. - if cmd.ExitStatus != 0 { + // Ignores disconnect errors. + if cmd.ExitStatus != packer.CmdDisconnect && cmd.ExitStatus != 0 { state.Put("error", fmt.Errorf( "Shutdown command has non-zero exit status.\n\nStdout: %s\n\nStderr: %s", stdout.String(), stderr.String()))