providers/virtualbox: 4.2 max network adapters to 36 [GH-1886]

This commit is contained in:
Mitchell Hashimoto 2013-08-29 16:50:20 -07:00
parent 0f4ba6dc3b
commit c38d28f1c5
4 changed files with 12 additions and 1 deletions

View File

@ -58,6 +58,8 @@ BUG FIXES:
- guests/debian: Force bring up eth0. Fixes hangs on setting hostname. - guests/debian: Force bring up eth0. Fixes hangs on setting hostname.
[GH-2026] [GH-2026]
- hosts/fedora: properly detect later CentOS versions. [GH-2008] - hosts/fedora: properly detect later CentOS versions. [GH-2008]
- providers/virtualbox: VirtualBox 4.2 now supports up to 36
network adapters. [GH-1886]
- provisioners/ansible: Execute ansible with a cwd equal to the - provisioners/ansible: Execute ansible with a cwd equal to the
path where the Vagrantfile is. [GH-2051] path where the Vagrantfile is. [GH-2051]
- provisioners/ansible: No longer report failure on every run. [GH-2007] - provisioners/ansible: No longer report failure on every run. [GH-2007]

View File

@ -12,7 +12,7 @@ module VagrantPlugins
# excluding the NAT adapter on port 1 which Vagrant always # excluding the NAT adapter on port 1 which Vagrant always
# expects to exist. # expects to exist.
adapters = [] adapters = []
2.upto(8).each do |i| 2.upto(env[:machine].provider.driver.max_network_adapters).each do |i|
adapters << { adapters << {
:adapter => i, :adapter => i,
:type => :none :type => :none

View File

@ -153,6 +153,11 @@ module VagrantPlugins
def import(ovf) def import(ovf)
end end
# Returns the maximum number of network adapters.
def max_network_adapters
8
end
# Returns a list of forwarded ports for a VM. # Returns a list of forwarded ports for a VM.
# #
# @param [String] uuid UUID of the VM to read from, or `nil` if this # @param [String] uuid UUID of the VM to read from, or `nil` if this

View File

@ -202,6 +202,10 @@ module VagrantPlugins
nil nil
end end
def max_network_adapters
36
end
def read_forwarded_ports(uuid=nil, active_only=false) def read_forwarded_ports(uuid=nil, active_only=false)
uuid ||= @uuid uuid ||= @uuid