We should verify VirtualBox is detected before looking for the old VM
This commit is contained in:
parent
e05bfb7efc
commit
cab625c06c
|
@ -45,13 +45,6 @@ module Vagrant
|
||||||
|
|
||||||
@logger.info("VBoxManage path: #{@vboxmanage_path}")
|
@logger.info("VBoxManage path: #{@vboxmanage_path}")
|
||||||
|
|
||||||
if @uuid
|
|
||||||
# Verify the VM exists, and if it doesn't, then don't worry
|
|
||||||
# about it (mark the UUID as nil)
|
|
||||||
r = raw("showvminfo", @uuid)
|
|
||||||
raise VMNotFound if r.exit_code != 0
|
|
||||||
end
|
|
||||||
|
|
||||||
# Read and assign the version of VirtualBox we know which
|
# Read and assign the version of VirtualBox we know which
|
||||||
# specific driver to instantiate.
|
# specific driver to instantiate.
|
||||||
begin
|
begin
|
||||||
|
@ -61,6 +54,13 @@ module Vagrant
|
||||||
# error here.
|
# error here.
|
||||||
raise Errors::VirtualBoxNotDetected
|
raise Errors::VirtualBoxNotDetected
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if @uuid
|
||||||
|
# Verify the VM exists, and if it doesn't, then don't worry
|
||||||
|
# about it (mark the UUID as nil)
|
||||||
|
r = raw("showvminfo", @uuid)
|
||||||
|
raise VMNotFound if r.exit_code != 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# This clears the forwarded ports that have been set on the
|
# This clears the forwarded ports that have been set on the
|
||||||
|
|
Loading…
Reference in New Issue