diff --git a/CHANGELOG.md b/CHANGELOG.md index 3462290d8..b53d4add4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Human friendly error if connection times out for HTTP downloads. [GH-849] - Detect when the VirtualBox installation is incomplete and error. [GH-846] - Use `LogLevel QUIET` for SSH to suppress the known hosts warning. [GH-847] + - VMs in the "guru meditation" state can be destroyed now using + `vagrant destroy`. ## 1.0.2 (March 25, 2012) diff --git a/lib/vagrant/action/vm/halt.rb b/lib/vagrant/action/vm/halt.rb index 24367eb7f..65bc06d0d 100644 --- a/lib/vagrant/action/vm/halt.rb +++ b/lib/vagrant/action/vm/halt.rb @@ -8,12 +8,16 @@ module Vagrant end def call(env) - if env[:vm].state == :running - if !env["force"] + current_state = env[:vm].state + if current_state == :running || current_state == :gurumeditation + # If the VM is running and we're not forcing, we can + # attempt a graceful shutdown + if current_state == :running && !env["force"] env[:ui].info I18n.t("vagrant.actions.vm.halt.graceful") env[:vm].guest.halt end + # If we're not powered off now, then force it if env[:vm].state != :poweroff env[:ui].info I18n.t("vagrant.actions.vm.halt.force") env[:vm].driver.halt