Skip to content

Commit

Permalink
allow specification of mac in network command
Browse files Browse the repository at this point in the history
  • Loading branch information
vishvananda authored and mitchellh committed Feb 9, 2011
1 parent 84b4638 commit 211f9d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/vagrant/action/vm/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def assign_network
adapter.enabled = true
adapter.attachment_type = :host_only
adapter.host_interface = network_name(network_options)
if network_options[:mac]
adapter.mac = network_options[:mac]
end
adapter.save
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/vagrant/config/vm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def network(ip, options=nil)
:ip => ip,
:netmask => "255.255.255.0",
:adapter => 1,
:mac = nil,
:name => nil
}.merge(options || {})

Expand Down

0 comments on commit 211f9d4

Please sign in to comment.