The type of nic can be set for bridged network.

:nic_type can be specified in the network bridged type. Its value can
be Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, virtio.
This commit is contained in:
sathlan 2012-01-29 02:49:12 +01:00 committed by Mitchell Hashimoto
parent d687473760
commit 4715400761
3 changed files with 11 additions and 1 deletions

View File

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

View File

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

View File

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