Fix reload with VBoxManage
This commit is contained in:
parent
a3395f94ab
commit
63720cc750
|
@ -203,7 +203,12 @@ module Vagrant
|
||||||
ports = []
|
ports = []
|
||||||
execute("list", "vms").split("\n").each do |line|
|
execute("list", "vms").split("\n").each do |line|
|
||||||
if line =~ /^".+?" \{(.+?)\}$/
|
if line =~ /^".+?" \{(.+?)\}$/
|
||||||
read_forwarded_ports($1.to_s, true).each do |_, _, hostport, _|
|
uuid = $1.to_s
|
||||||
|
|
||||||
|
# Ignore our own used ports
|
||||||
|
next if uuid == @uuid
|
||||||
|
|
||||||
|
read_forwarded_ports(uuid, true).each do |_, _, hostport, _|
|
||||||
ports << hostport
|
ports << hostport
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,7 +33,7 @@ module Vagrant
|
||||||
# occur within a reasonable amount of time (15 seconds by default),
|
# occur within a reasonable amount of time (15 seconds by default),
|
||||||
# then simply return and allow Vagrant to kill the machine.
|
# then simply return and allow Vagrant to kill the machine.
|
||||||
count = 0
|
count = 0
|
||||||
while vm.vm.state != :powered_off
|
while vm.state != :powered_off
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
return if count >= vm.config.freebsd.halt_timeout
|
return if count >= vm.config.freebsd.halt_timeout
|
||||||
|
|
|
@ -31,7 +31,7 @@ module Vagrant
|
||||||
# occur within a reasonable amount of time (15 seconds by default),
|
# occur within a reasonable amount of time (15 seconds by default),
|
||||||
# then simply return and allow Vagrant to kill the machine.
|
# then simply return and allow Vagrant to kill the machine.
|
||||||
count = 0
|
count = 0
|
||||||
while vm.vm.state != :powered_off
|
while vm.state != :powered_off
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
return if count >= vm.config.linux.halt_timeout
|
return if count >= vm.config.linux.halt_timeout
|
||||||
|
|
|
@ -68,7 +68,7 @@ module Vagrant
|
||||||
# then simply return and allow Vagrant to kill the machine.
|
# then simply return and allow Vagrant to kill the machine.
|
||||||
count = 0
|
count = 0
|
||||||
last_error = nil
|
last_error = nil
|
||||||
while vm.vm.state != :powered_off
|
while vm.state != :powered_off
|
||||||
begin
|
begin
|
||||||
ssh.exec!("#{vm.config.solaris.suexec_cmd} /usr/sbin/poweroff")
|
ssh.exec!("#{vm.config.solaris.suexec_cmd} /usr/sbin/poweroff")
|
||||||
rescue IOError => e
|
rescue IOError => e
|
||||||
|
|
|
@ -22,7 +22,7 @@ module Vagrant
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
# Build the ChildProcess
|
# Build the ChildProcess
|
||||||
@logger.debug("Starting process: #{@command.inspect}")
|
@logger.info("Starting process: #{@command.inspect}")
|
||||||
process = ChildProcess.build(*@command)
|
process = ChildProcess.build(*@command)
|
||||||
|
|
||||||
# Create the pipes so we can read the output in real time as
|
# Create the pipes so we can read the output in real time as
|
||||||
|
|
Loading…
Reference in New Issue