diff --git a/CHANGELOG.md b/CHANGELOG.md index 35b2cf945..210d15653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,11 @@ IMPROVEMENTS: - More precise detection of Ubuntu/Debian guests so that running Vagrant within an LXC container works properly now. +BUG FIXES: + + - Ignore "guest not ready" errors when attempting to graceful halt and + carry on checks whether the halt succeeded. [GH-1679] + ## 1.2.2 (April 23, 2013) FEATURES: diff --git a/lib/vagrant/action/builtin/graceful_halt.rb b/lib/vagrant/action/builtin/graceful_halt.rb index da1235551..fc218a94c 100644 --- a/lib/vagrant/action/builtin/graceful_halt.rb +++ b/lib/vagrant/action/builtin/graceful_halt.rb @@ -44,7 +44,12 @@ module Vagrant # checked above. if graceful env[:ui].info I18n.t("vagrant.actions.vm.halt.graceful") - env[:machine].guest.capability(:halt) + + begin + env[:machine].guest.capability(:halt) + rescue Errors::MachineGuestNotReady + @logger.info("Machine guest not ready while attempting to halt. Ignoring.") + end @logger.debug("Waiting for target graceful halt state: #{@target_state}") count = 0