mitchellh/vagrant — Issue #704: assign_interface_numbers undefined method
Author: ferrylandzaat
Created: 2012-02-02 16:40:20+00:00
State: open

Running into this issue on 0.9.4:

```
[default] Importing base box 'vagrant-box-squeeze'...
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3306 => 4003 (adapter 1)
[default] -- 9000 => 4004 (adapter 1)
[default] -- 1026 => 4002 (adapter 1)
[default] -- 80 => 4001 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Running any VM customizations...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Forcing shutdown of VM...
[default] Destroying VM and associated drives...
/var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/network.rb:154:in `assign_interface_numbers': undefined method `[]=' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/network.rb:149:in `each_index'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/network.rb:149:in `assign_interface_numbers'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/network.rb:69:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/clear_network_interfaces.rb:26:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/host_name.rb:10:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/share_folders.rb:20:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.4/lib/vagrant/action/vm/clear_shared_folders.rb:13:in `call'
```

I have the following network-related in my vagrantfile:

```
config.vm.host_name = hostname
config.vm.customize ["modifyvm", :id, "--name", hostname]
config.vm.network :bridged, :auto_config => false
config.vm.forward_port 80, 4001, :auto => true
config.vm.forward_port 1026, 4002, :auto => true
config.vm.forward_port 3306, 4003, :auto => true
config.vm.forward_port 9000, 4004, :auto => true
```