Spinning up multiple VMs with Vagrant


Hello Community,

I am seeing this error when trying to run multiple VX with Vagrant, can you help me out in setting this up as per the example here (https://docs.cumulusnetworks.com/display/VX/Using+Cumulus+VX+with+Vagrant).

Thanks for the help!

Here's my Vagrantconfig file:

Vagrant.configure(2) do |config|

config.vm.define "leaf1" do |leaf1|
leaf1.vm.box = "cumulus-vx-3.2.0"

# Internal network for swp* interfaces.
leaf1.vm.network "private_network", virtualbox_intnet: "swp1"
leaf1.vm.network "private_network", virtualbox_intnet: "swp2"
leaf1.vm.network "private_network", virtualbox_intnet: "swp3"
leaf1.vm.network "private_network", virtualbox_intnet: "swp4"
end

config.vm.define "leaf2" do |leaf2|
leaf2.vm.box = "cumulus-vx-3.2.0"

# Internal network for swp* interfaces.
leaf2.vm.network "private_network", virtualbox_intnet: "swp1"
leaf2.vm.network "private_network", virtualbox_intnet: "swp2"
leaf2.vm.network "private_network", virtualbox_intnet: "swp3"
leaf2.vm.network "private_network", virtualbox_intnet: "swp4"
end

end
~
~
~
~
~
~
~
~
~
"Vagrantfile" 24L, 825C

NetApps-MacBook-Pro:~ netapprtp$ vagrant up
Bringing machine 'leaf1' up with 'virtualbox' provider...
Bringing machine 'leaf2' up with 'virtualbox' provider...
==> leaf1: Importing base box 'cumulus-vx-3.2.0'...
==> leaf1: Matching MAC address for NAT networking...
==> leaf1: Setting the name of the VM: netapprtp_leaf1_1486509984113_69332
==> leaf1: Clearing any previously set network interfaces...
==> leaf1: Destroying VM and associated drives...
/opt/vagrant/embedded/lib/ruby/2.2.0/ipaddr.rb:475:in 'initialize': address family must be specified (IPAddr::AddressFamilyError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/network.rb:261:in 'new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/network.rb:261:in 'hostonly_config'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/network.rb:90:in 'block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/network.rb:83:in 'each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/network.rb:83:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:18:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/synced_folders.rb:87:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/synced_folders/nfs/action_cleanup.rb:25:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:49:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/env_set.rb:19:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/provision.rb:80:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/set_name.rb:50:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in 'busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in 'busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in 'busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/box_check_outdated.rb:36:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/config_validate.rb:25:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/match_mac_address.rb:19:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/discard_state.rb:15:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/import.rb:74:in 'import'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/import.rb:13:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb:17:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/prepare_clone.rb:15:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/customize.rb:40:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in 'busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/config_validate.rb:25:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/handle_box.rb:56:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in 'block in finalize_action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in 'busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in 'busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in 'run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:225:in 'action_raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:200:in 'block in action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/environment.rb:567:in 'lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in 'call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in 'action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/batch_action.rb:82:in 'block (2 levels) in run'
NetApps-MacBook-Pro:~ netapprtp$

1 reply

Userlevel 4
The issue looks to be due to a typo. Try adding another underscore ("_") in the "virtualbox_intnet:" lines. There are actually 2 underscores there which is very easy to miss. The other piece you'll want to add is the "auto_config: false" bit to the end of each network creation line so they look like this: leaf1.vm.network "private_network", virtualbox__intnet: "swp1", auto_config: false

Reply