VM halt works.

This commit is contained in:
Mitchell Hashimoto 2011-12-21 13:41:10 -08:00
parent 48ea8173c6
commit 9cb0578c64
2 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module Vagrant
if env[:vm].state != :poweredoff
env[:ui].info I18n.t("vagrant.actions.vm.halt.force")
env[:vm].vm.stop
env[:vm].driver.halt
end
# Sleep for a second to verify that the VM properly

View File

@ -87,6 +87,11 @@ module Vagrant
execute("modifyvm", @uuid, *args)
end
# Halts the virtual machine.
def halt
execute("controlvm", @uuid, "poweroff")
end
# Imports the VM with the given path to the OVF file. It returns
# the UUID as a string.
def import(ovf, name)