diff --git a/CHANGELOG.md b/CHANGELOG.md index d615f41c9..1f53e074f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ - Match VM names that have parens, brackets, etc. - Detect when the VirtualBox kernel module is not loaded and error. [GH-677] + - Set `:auto_config` to false on any networking option to not automatically + configure it on the guest. [GH-663] ## 0.9.3 (January 24, 2012) diff --git a/lib/vagrant/action/vm/network.rb b/lib/vagrant/action/vm/network.rb index f6520afb9..122802027 100644 --- a/lib/vagrant/action/vm/network.rb +++ b/lib/vagrant/action/vm/network.rb @@ -37,8 +37,12 @@ module Vagrant adapters << adapter # Get the network configuration - network = send("#{type}_network_config", config) - networks << network + if config[:auto_config] + network = send("#{type}_network_config", config) + networks << network + else + @logger.info("Auto config disabled, not configuring: #{type}") + end end if !adapters.empty? @@ -167,7 +171,8 @@ module Vagrant :netmask => "255.255.255.0", :adapter => nil, :mac => nil, - :name => nil + :name => nil, + :auto_config => true }.merge(options) # Verify that this hostonly network wouldn't conflict with any @@ -307,7 +312,8 @@ module Vagrant return { :adapter => nil, - :mac => nil + :mac => nil, + :auto_config => true }.merge(options) end