vagrant/plugins/guests/esxi/cap/halt.rb

17 lines
353 B
Ruby
Raw Normal View History

module VagrantPlugins
module GuestEsxi
module Cap
class Halt
def self.halt(machine)
begin
machine.communicate.execute("/bin/halt -d 0")
rescue IOError
# Ignore, this probably means connection closed because it
# shut down.
end
end
end
end
end
end