diff --git a/lib/vagrant/driver/virtualbox.rb b/lib/vagrant/driver/virtualbox.rb index 480a0967a..4d01a5773 100644 --- a/lib/vagrant/driver/virtualbox.rb +++ b/lib/vagrant/driver/virtualbox.rb @@ -45,13 +45,6 @@ module Vagrant @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 # specific driver to instantiate. begin @@ -61,6 +54,13 @@ module Vagrant # error here. raise Errors::VirtualBoxNotDetected 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 # This clears the forwarded ports that have been set on the