Discarding state works with VBoxManage

This commit is contained in:
Mitchell Hashimoto 2011-12-25 09:53:54 -08:00
parent ebd6507e62
commit e870d1b29e
2 changed files with 6 additions and 1 deletions

View File

@ -11,7 +11,7 @@ module Vagrant
def call(env)
if env[:vm].state == :saved
env[:ui].info I18n.t("vagrant.actions.vm.discard_state.discarding")
env[:vm].vm.discard_state
env[:vm].driver.discard_saved_state
end
@app.call(env)

View File

@ -107,6 +107,11 @@ module Vagrant
end
end
# Discards any saved state associated with this VM.
def discard_saved_state
execute("discardstate", @uuid)
end
# Executes a raw command.
def execute_command(command)
raw(*command)