From ec90382efe2a08890026d6e4d39be1eba231afeb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 19 Apr 2010 21:28:13 -0700 Subject: [PATCH] Reload sleeps 1 sec after halt to avoid FFI exception --- lib/vagrant/actions/vm/reload.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vagrant/actions/vm/reload.rb b/lib/vagrant/actions/vm/reload.rb index 22463dbbf..40abf231a 100644 --- a/lib/vagrant/actions/vm/reload.rb +++ b/lib/vagrant/actions/vm/reload.rb @@ -11,6 +11,13 @@ module Vagrant @runner.add_action(action_klass) end end + + def after_halt + # This sleep is here to allow the VM to clean itself up. There appears + # nothing [obvious] in the VirtualBox API to automate this. For now, this + # is an interim solution. + sleep 1 + end end end end