mitchellh/vagrant — Issue #689: Error if all the interfaces are set to auto_config: false.
Author: sathlan
Created: 2012-01-29 03:33:19+00:00
State: open

Hi,

in such a setup:

config.vm.network :bridged, { auto_config: false }
config.vm.network :bridged, { auto_config: false }

I got:
> vagrant up fw1
[fw1] VM already created. Booting if it's not already running...
[fw1] Clearing any previously set forwarded ports...
[fw1] Forwarding ports...
[fw1] -- 22 => 2222 (adapter 1)
[fw1] Creating shared folders metadata...
[fw1] Clearing any previously set network interfaces...
[fw1] Preparing network interfaces based on configuration...
[fw1] Booting VM...
[fw1] Waiting for VM to boot. This can take a few minutes.
[fw1] VM booted and ready for use!
/usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/network.rb:158:in `block in assign_interface_numbers': undefined method `[]=' for nil:NilClass (NoMethodError)
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/network.rb:149:in `each_index'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/network.rb:149:in `assign_interface_numbers'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/network.rb:69:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/clear_network_interfaces.rb:26:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/host_name.rb:10:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/share_folders.rb:20:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/clear_shared_folders.rb:13:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/nfs.rb:40:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/prune_nfs_exports.rb:15:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/provision.rb:29:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/forward_ports.rb:24:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/check_port_collisions.rb:38:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/env/set.rb:16:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/clear_forwarded_ports.rb:13:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/clean_machine_folder.rb:17:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/general/validate.rb:14:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/builder.rb:92:in `call'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/runner.rb:49:in `block in run'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/action/runner.rb:49:in `run'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/vm.rb:192:in `run_action'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/vm.rb:150:in `start'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/command/up.rb:43:in `block in execute'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/command/base.rb:100:in `block in with_target_vms'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/command/base.rb:95:in `each'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/command/base.rb:95:in `with_target_vms'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/command/up.rb:39:in `execute'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/cli.rb:38:in `execute'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/lib/vagrant/environment.rb:156:in `cli'
from /usr/local/lib/ruby/gems/1.9/gems/vagrant-0.9.3.1/bin/vagrant:43:in `'
from /usr/local/bin/vagrant:19:in `load'
from /usr/local/bin/vagrant:19:in `

'

I fixed it using this patch: sathlan/vagrant@eaa0e8d9d591d41bfad9986ff58e3d3cd2e7287f in branch hotfixes/auto_config-false.