diff --git a/lib/vagrant/action/vm/network.rb b/lib/vagrant/action/vm/network.rb index 94f7acd33..a50bce2e2 100644 --- a/lib/vagrant/action/vm/network.rb +++ b/lib/vagrant/action/vm/network.rb @@ -354,7 +354,8 @@ module Vagrant :adapter => config[:adapter], :type => :bridged, :bridge => chosen_bridge, - :mac_address => config[:mac] + :mac_address => config[:mac], + :nic_type => config[:nic_type], } end diff --git a/lib/vagrant/driver/virtualbox_4_0.rb b/lib/vagrant/driver/virtualbox_4_0.rb index d491b4d7b..b942ee35c 100644 --- a/lib/vagrant/driver/virtualbox_4_0.rb +++ b/lib/vagrant/driver/virtualbox_4_0.rb @@ -112,6 +112,11 @@ module Vagrant args.concat(["--macaddress#{adapter[:adapter]}", adapter[:mac_address]]) end + + if adapter[:nic_type] + args.concat(["--nictype#{adapter[:adapter]}", adapter[:nic_type].to_s]) + end + end execute("modifyvm", @uuid, *args) diff --git a/lib/vagrant/driver/virtualbox_4_1.rb b/lib/vagrant/driver/virtualbox_4_1.rb index fa2178966..ca20a7b4f 100644 --- a/lib/vagrant/driver/virtualbox_4_1.rb +++ b/lib/vagrant/driver/virtualbox_4_1.rb @@ -112,6 +112,10 @@ module Vagrant args.concat(["--macaddress#{adapter[:adapter]}", adapter[:mac_address]]) end + + if adapter[:nic_type] + args.concat(["--nictype#{adapter[:adapter]}", adapter[:nic_type].to_s]) + end end execute("modifyvm", @uuid, *args)