Issue running vagrant for the first time!!

674 views
Skip to first unread message

Peter Waithe

unread,
Jul 25, 2016, 7:24:05 AM7/25/16
to Vagrant
I am trying to get up to speed with vagrant. This is being used with VirtualBox.

Here I have the following versions of software installed on my MAC OSX El Captain (10.11.6):

VirtualBox 5.0.26-10
Vagrant 1.8.5

I have run the following commands to bring and I am getting an error:

vagrant init precise64
vagrant up

Below are the commands and there associated outputs. Can someone tell me why I get the error after running vagrant up. 

Thanks



 $ vagrant init precise64

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

 $ vagrant up

  Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'precise64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
/opt/vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:66:in `split': bad URI(is not URI?): file:///Users/waithep/VirtualBox VMs/precise64 (URI::InvalidURIError)
from /opt/vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72:in `parse'
from /opt/vagrant/embedded/lib/ruby/2.2.0/uri/common.rb:226:in `parse'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/box_add.rb:471:in `metadata_url?'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/box_add.rb:81:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/box_add.rb:79:in `map'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/box_add.rb:79:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/handle_box.rb:82:in `handle_box'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/handle_box.rb:42:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/handle_box.rb:36:in `synchronize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/handle_box.rb:36:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:225:in `action_raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:200:in `block in action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:561:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

Peter Waithe

unread,
Jul 25, 2016, 7:43:57 AM7/25/16
to Vagrant
OK I am getting a little further but I am still having issues. The error was that there was a space in the directory "VirtualBox VMs" this has been fixed by renaming the directory "VirtualBox VMs" to "VirtualBox".

Now the error is as follows:

Bringing machine 'default' up with 'virtualbox' provider...

==> default: Box 'precise64' could not be found. Attempting to find and install...

    default: Box Provider: virtualbox

    default: Box Version: >= 0

==> default: Box file was not detected as metadata. Adding it directly...

==> default: Adding box 'precise64' (v0) for provider: virtualbox

    default: Downloading: precise64

An error occurred while downloading the remote file. The error

message, if any, is reproduced below. Please fix this error and try

again.


Couldn't open file /Users/waithep/VirtualBox/precise64


Any Ideas anyone!!


Thanks

Peter Waithe

unread,
Jul 25, 2016, 9:06:47 AM7/25/16
to Vagrant
Ok I have got my problem sorted. The book that I am reading from is called "Vagrant: Up and Running" and is slightly old and therefore the way that vagrant works has changed. Here is what I had to do to fix the my problem.

Go to  atlas.hashicorp.com and within 'Select Vagrant Boxes' type 'precise64'

Here is the link for the lazy:


Copied the following command from the link above for virtualbox and pressed carriage return. See below:

vagrant init hashicorp/precise64; vagrant up --provider virtualbox


Everything worked fine. I will also update the book mentioned above for my reference.

Thanks


 



On Monday, 25 July 2016 12:24:05 UTC+1, Peter Waithe wrote:
Reply all
Reply to author
Forward
0 new messages