If you want to set non-provider specific configuration inside a provider block you have to use a different syntax:
config.vm.define "mymachine" do |vbox_config|
vbox_config.vm.provider :virtualbox do |vb, override|
override.ssh.forward_agent = true
override.vm.network :private_network, ip: "10.10.10.10"
end
end
Indeed, the first argument is for provider specific configuration (e.g. vb.customize
), while the second is for overrides. Please see the documentation for more information.