Merge pull request #531 from Flowm/winmac

Fix network interface configuration for windows guests
This commit is contained in:
Dmitry Vasilets 2015-12-30 00:48:01 +01:00
commit 9d331d2ed6

View File

@ -3,7 +3,13 @@ module VagrantPlugins
module Cap
class NicMacAddresses
def self.nic_mac_addresses(machine)
machine.provider.mac_addresses
# Vagrant expects a Hash with an index starting at 1 as key
# and the mac as uppercase string without colons as value
nic_macs = {}
machine.provider.mac_addresses.each do |index, mac|
nic_macs[index+1] = mac.upcase.gsub(':','')
end
nic_macs
end
end
end