Fix issue where starting a VM failure was false negative [GH-720]
This commit is contained in:
parent
f81fb58cd9
commit
aa18ea3fd0
|
@ -11,6 +11,8 @@
|
||||||
- `vagrant destroy` now asks for confirmation by default. This can be
|
- `vagrant destroy` now asks for confirmation by default. This can be
|
||||||
overridden with the `--force` flag. [GH-699]
|
overridden with the `--force` flag. [GH-699]
|
||||||
- Fix issue with Puppet config inheritance. [GH-722]
|
- Fix issue with Puppet config inheritance. [GH-722]
|
||||||
|
- Fix issue where starting a VM on some systems was incorrectly treated
|
||||||
|
as failing. [GH-720]
|
||||||
|
|
||||||
## 0.9.6 (February 7, 2012)
|
## 0.9.6 (February 7, 2012)
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,17 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def start(mode)
|
def start(mode)
|
||||||
execute("startvm", @uuid, "--type", mode.to_s)
|
command = ["startvm", @uuid, "--type", mode.to_s]
|
||||||
|
r = raw(*command)
|
||||||
|
|
||||||
|
if r.exit_code == 0 || r.stdout =~ /VM ".+?" has been successfully started/
|
||||||
|
# Some systems return an exit code 1 for some reason. For that
|
||||||
|
# we depend on the output.
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
# If we reached this point then it didn't work out.
|
||||||
|
raise Errors::VBoxManageError, :command => command.inspect
|
||||||
end
|
end
|
||||||
|
|
||||||
def suspend
|
def suspend
|
||||||
|
|
|
@ -417,7 +417,17 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def start(mode)
|
def start(mode)
|
||||||
execute("startvm", @uuid, "--type", mode.to_s)
|
command = ["startvm", @uuid, "--type", mode.to_s]
|
||||||
|
r = raw(*command)
|
||||||
|
|
||||||
|
if r.exit_code == 0 || r.stdout =~ /VM ".+?" has been successfully started/
|
||||||
|
# Some systems return an exit code 1 for some reason. For that
|
||||||
|
# we depend on the output.
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
# If we reached this point then it didn't work out.
|
||||||
|
raise Errors::VBoxManageError, :command => command.inspect
|
||||||
end
|
end
|
||||||
|
|
||||||
def suspend
|
def suspend
|
||||||
|
|
Loading…
Reference in New Issue