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 if env[:vm].state != :poweredoff
env[:ui].info I18n.t("vagrant.actions.vm.halt.force") env[:ui].info I18n.t("vagrant.actions.vm.halt.force")
env[:vm].vm.stop env[:vm].driver.halt
end end
# Sleep for a second to verify that the VM properly # Sleep for a second to verify that the VM properly

View File

@ -87,6 +87,11 @@ module Vagrant
execute("modifyvm", @uuid, *args) execute("modifyvm", @uuid, *args)
end 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 # Imports the VM with the given path to the OVF file. It returns
# the UUID as a string. # the UUID as a string.
def import(ovf, name) def import(ovf, name)