From fc708bc1398efabc2fe78388b88587def630a1a6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 3 Apr 2013 15:41:42 -0700 Subject: [PATCH] Respect :mac option for networks [GH-1536] --- CHANGELOG.md | 4 ++++ plugins/providers/virtualbox/action/network.rb | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ed95f07..bb6027bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ IMPROVEMENTS: - Specify the default provider with the `VAGRANT_DEFAULT_PROVIDER` environmental variable. [GH-1478] +BUG FIXES: + + - The `:mac` option for host-only networks is respected. [GH-1536] + ## 1.1.6 (April 3, 2013) BUG FIXES: diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index d6aa096a5..dca3000c9 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -209,6 +209,7 @@ module VagrantPlugins def hostonly_config(options) options = { :auto_config => true, + :mac => nil, :netmask => "255.255.255.0", :type => :static }.merge(options) @@ -263,7 +264,7 @@ module VagrantPlugins :adapter_ip => options[:adapter_ip], :auto_config => options[:auto_config], :ip => options[:ip], - :mac => nil, + :mac => options[:mac], :netmask => options[:netmask], :nic_type => nil, :type => options[:type]