VM halt works.
This commit is contained in:
parent
48ea8173c6
commit
9cb0578c64
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue