diff --git a/builder/vsphere/common/step_shutdown.go b/builder/vsphere/common/step_shutdown.go index 4eeb38e9c..afb697cfa 100644 --- a/builder/vsphere/common/step_shutdown.go +++ b/builder/vsphere/common/step_shutdown.go @@ -61,7 +61,8 @@ func (s *StepShutdown) Run(ctx context.Context, state multistep.StateBag) multis return multistep.ActionContinue } - if state.Get("communicator") == nil { + comm, _ := state.Get("communicator").(packer.Communicator) + if comm == nil { msg := fmt.Sprintf("Please shutdown virtual machine within %s.", s.Config.Timeout) ui.Message(msg)