Setting :auto_config to false will not configure a network. [GH-663]

This commit is contained in:
Mitchell Hashimoto 2012-01-24 21:29:26 -08:00
parent ce2ea4ea93
commit 3cda2e48dc
2 changed files with 12 additions and 4 deletions

View File

@ -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)

View File

@ -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