lib/vagrant-windows/guest/cap/halt.rb in vagrant-windows-1.3.0.pre.2 vs lib/vagrant-windows/guest/cap/halt.rb in vagrant-windows-1.3.0.pre.3

- old
+ new

@@ -1,9 +1,13 @@ module VagrantWindows module Guest module Cap class Halt def self.halt(machine) + # Fix defect 129, if there's an existing scheduled reboot cancel it so shutdown succeeds + machine.communicate.execute("shutdown -a", :error_check => false) + + # Force shutdown the machine now machine.communicate.execute("shutdown /s /t 1 /c \"Vagrant Halt\" /f /d p:4:1") # Wait until the VM's state is actually powered off. If this doesn't # occur within a reasonable amount of time (15 seconds by default), # then simply return and allow Vagrant to kill the machine.