Ok, so the issue of 3 networks can be resolved by:
config.vm.provider :virtualbox do |vb, override|
override.vm.box = 'Tourbuzz_Basebox_centos_65'
override.vm.box_url =
'https://s3.amazonaws.com/util.cloud.tourbuzz.net/base_boxes/opscode_centos-6.5_chef-11.8.2.box'
# private network
gives a static IP; ideal for juggling multiple machines
override.vm.network :private_network, ip: $vagrant[:network]
end
config.vm.provider :virtualbox do |vb|
vb.gui =
$vagrant[:gui]
vb.name = $vagrant[:vm_name] if $vagrant[:vm_name]
vb.customize
["modifyvm", :id, "--memory", $vagrant[:memory_size] ]
# enable multi-cpu shit
vb.customize ['modifyvm', :id, "--cpus",
$vagrant[:cpus] ]
vb.customize ["modifyvm", :id, "--ioapic",
$vagrant[:ioapic] ] # this is buggy, crashes on some machines.
if you have issues turn it off in Vagrantfile.local.rb
# makes DNS work
correctly (fast)
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"
]
end
Tested, and works cool.
Thanks to Teemu.
On Fri, Feb 7, 2014 at 2:42 AM, Teemu Matilainen <[email protected]>wrote:
> Hi Alan,
>
> On Thu, Feb 6, 2014 at 1:19 AM, Alan Pinstein <[email protected]> wrote:
>
>>
>> -
>> As a user I don't expect placing network config to be handled
>> differently when placed in a global config block vs a provider config
>> block, esp since vagrant seems to be heading in a direction where one
>> would
>> use it to configure the same box across different providers (dev on VBox,
>> prod on AWS for instance), being able to have per-provider network config
>> work gracefully would seem to be the goal.
>>
>>
> This is totally supported. But you have to use the `override` variable in
> the `provider` block. See "Overriding Configuration" in the docs:
> http://docs.vagrantup.com/v2/providers/configuration.html
>
> --
> Cheers,
> - Teemu
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.