diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index 7188398a6..e9bb30086 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -248,10 +248,10 @@ module VagrantPlugins def hostonly_config(options) options = { auto_config: true, + dhcp_server: true, mac: nil, nic_type: nil, type: :static, - dhcp_server: true, }.merge(options) # Make sure the type is a symbol @@ -321,6 +321,7 @@ module VagrantPlugins return { adapter_ip: options[:adapter_ip], auto_config: options[:auto_config], + dhcp_server: options[:dhcp_server], ip: options[:ip], mac: options[:mac], name: options[:name], diff --git a/test/unit/plugins/providers/virtualbox/action/network_test.rb b/test/unit/plugins/providers/virtualbox/action/network_test.rb index 34ed17d94..921d88bf6 100644 --- a/test/unit/plugins/providers/virtualbox/action/network_test.rb +++ b/test/unit/plugins/providers/virtualbox/action/network_test.rb @@ -123,6 +123,7 @@ describe VagrantPlugins::ProviderVirtualBox::Action::Network do dhcp_ip: "172.28.128.2", dhcp_lower: "172.28.128.3", dhcp_upper: "172.28.128.254", + dhcp_server: true, adapter: 2 })