diff --git a/CHANGELOG.md b/CHANGELOG.md index cdf7a0ad2..edb1e0ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ IMPROVEMENTS: - core: add `--color` to any Vagrant command to FORCE color output. [GH-2027] - core: "config.vm.host_name" works again, just an alias to hostname. + - core: Reboots via SSH are now handled gracefully (without exception). - commands/plugin/install: Post install message of a plugin will be shown if available. [GH-1986] - commands/status: cosmetic improvement to better align names and diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb index c0b7c7321..8ba50fb16 100644 --- a/plugins/communicators/ssh/communicator.rb +++ b/plugins/communicators/ssh/communicator.rb @@ -359,7 +359,12 @@ module VagrantPlugins end # Wait for the channel to complete - channel.wait + begin + channel.wait + rescue IOError + @logger.info("SSH connection unexpected closed. Assuming reboot or something.") + exit_status = 0 + end ensure # Kill the keep-alive thread keep_alive.kill if keep_alive