# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
(1..3).each do |i|
config.vm.define "node#{i}" do |node|
node.vm.box = "node#{i}"
node.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get upgrade -y
SHELL
end
end
end
Bringing machine 'node1' up with 'virtualbox' provider...
Bringing machine 'node2' up with 'virtualbox' provider...
Bringing machine 'node3' up with 'virtualbox' provider...
==> node1: Box 'node1' could not be found. Attempting to find and install...
node1: Box Provider: virtualbox
node1: Box Version: >= 0
/opt/vagrant/embedded/lib/ruby/2.3.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): file:///Volumes/Mac 2TB/Users/jjimenez/vagrant/node1 (URI::InvalidURIError)
from /opt/vagrant/embedded/lib/ruby/2.3.0/uri/rfc3986_parser.rb:73:in `parse'
from /opt/vagrant/embedded/lib/ruby/2.3.0/uri/common.rb:227:in `parse'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/box_add.rb:485:in `metadata_url?'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/box_add.rb:91:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/box_add.rb:89:in `map'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/box_add.rb:89:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/handle_box.rb:82:in `handle_box'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/handle_box.rb:42:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/handle_box.rb:36:in `synchronize'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/handle_box.rb:36:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/machine.rb:227:in `action_raw'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/machine.rb:202:in `block in action'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/environment.rb:631:in `lock'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/machine.rb:188:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/machine.rb:188:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
As in the Tips and Tricks examples, three VM's should come up.
Barf.
A properly formatted URI has no spaces (replaced with %20)
Steve
OSX allows volume names with spaces. I did not specify the URI, vagrant did.
Hi @flybd5 - is there a reason why you are dynamically setting the box setting? Do you have vagrant boxes on your system named "node1", "node2",...etc?
Well, that cleared it up. Pilot error. :)
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Well, that cleared it up. Pilot error. :)