Class: VagrantPlugins::GuestEsxi::Cap::Halt

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-esxi/cap/halt.rb

Class Method Summary collapse

Class Method Details

.halt(machine) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/vagrant-esxi/cap/halt.rb', line 5

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