From 7a89ab7fadfd6dcd46d3cdb7d960912d3f2c126f Mon Sep 17 00:00:00 2001 From: Jon Heise Date: Sat, 18 May 2013 23:41:33 -0700 Subject: [PATCH] patching network.rb to allow setting static ip's on public networks --- plugins/providers/virtualbox/action/network.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index 591583ffc..186c0f760 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -200,6 +200,17 @@ module VagrantPlugins end def bridged_network_config(config) + if config[:ip] + options = { + :auto_config => true, + :mac => nil, + :netmask => "255.255.255.0", + :type => :static + }.merge(config) + options[:type] = options[:type].to_sym + return options + end + return { :type => :dhcp, :use_dhcp_assigned_default_route => config[:use_dhcp_assigned_default_route]