Sha256: aaa1c2fb0ec2b432f5d14f9036632faafe8f9d9af44b05a58cccfb601f7d61ea
Contents?: true
Size: 687 Bytes
Versions: 13
Compression:
Stored size: 687 Bytes
Contents
module VagrantWindows module Guest module Cap class Halt def self.halt(machine) machine.communicate.execute("shutdown /s /t 1 /c \"Vagrant Halt\" /f /d p:4:1") # Wait until the VM's state is actually powered off. If this doesn't # occur within a reasonable amount of time (15 seconds by default), # then simply return and allow Vagrant to kill the machine. count = 0 while machine.state != :poweroff count += 1 return if count >= machine.config.windows.halt_timeout sleep machine.config.windows.halt_check_interval end end end end end end
Version data entries
13 entries across 13 versions & 2 rubygems