mitchellh/vagrant — Issue #743: Allow setting an IP address on :bridged
Author: deanperry
Created: 2012-02-15 19:22:16+00:00
State: open

I would like to be able to manually set an IP address on a Vagrant machine using the Vagrantfile.
When I set `config.vm.network :bridged, "192.168.1.200"`, when creating the machine, it breaks and destroys the machine.

It does it on both my Ubuntu machine and Mac.

Running vagrant `0.9.7`.

This is what I get on my Ubuntu machine which is where I will be running my Vagrant machines:

dean@dean-ubuntu:~/VMs/lucid32$ vagrant up
[default] Importing base box 'lucid32'...

Guest Additions Version: 4.1.0
VirtualBox Version: 4.1.8
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Forwarding ports...
[default] -- 22 => 2200 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Destroying VM and associated drives...
/usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/network.rb:318:in `merge': can't convert String into Hash (TypeError)
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/network.rb:318:in `bridged_config'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/network.rb:33:in `block in call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/network.rb:31:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/network.rb:31:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/clear_network_interfaces.rb:26:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/host_name.rb:10:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/share_folders.rb:20:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/clear_shared_folders.rb:13:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/nfs.rb:40:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/prune_nfs_exports.rb:15:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/provision.rb:29:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/forward_ports.rb:24:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_port_collisions.rb:38:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/env/set.rb:16:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/clear_forwarded_ports.rb:13:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/clean_machine_folder.rb:17:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/general/validate.rb:14:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/match_mac_address.rb:16:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/default_name.rb:17:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_guest_additions.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/import.rb:31:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_box.rb:28:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/general/validate.rb:14:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/builder.rb:92:in `call'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/runner.rb:49:in `block in run'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/util/busy.rb:19:in `busy'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/action/runner.rb:49:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/vm.rb:192:in `run_action'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/vm.rb:143:in `up'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/command/up.rb:46:in `block in execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/command/base.rb:100:in `block in with_target_vms'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/command/base.rb:95:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/command/base.rb:95:in `with_target_vms'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/command/up.rb:39:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/cli.rb:38:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/lib/vagrant/environment.rb:156:in `cli'
from /usr/local/lib/ruby/gems/1.9.1/gems/vagrant-0.9.7/bin/vagrant:43:in `'
from /usr/local/bin/vagrant:19:in `load'
from /usr/local/bin/vagrant:19:in `

'