The solution you present does work, but does not utilize a feature VirtualBox added to create a NAT network behind which all the VMs in a given NAT network reside. For example, I've used it to create (outside of Vagrant) a Puppet test environment with a Puppet Master and five clients without any particular complexity to the configuration. Just straightforward IPs and they can all access each other and the Internet just fine, with a single IP per system. Much closer to the reality of the production environments some tests are meant to reflect.
Your solution does work, but it adds complexity to what should be a very simple setup, and what Oracle has already integrated into VirtualBox itself. On Tuesday, May 19, 2015 at 4:36:48 PM UTC-7, Alvaro Miranda Aguilera wrote: > > Hello, > > Maybe I am missing something, but I think with normal networks you can do > the same.. > > What do you need that the normal vagrant networking doesn't provide? > > Check this: > > http://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home/RAC_Attack_Automation#/media/File:RA_Arquitecture_step2.png > > > Because this is how you usually work with Vagrant and virtualbox: > > Out of the box, you get the normal nat for eth0 connection > > Then, using a mix of shell provisioner and network configuration you can > > add a 2nd interface (any config.vm.network line create a new nic on top of > eth0.. you can't change eth0 this way) > remove the default gw that goes over the normal nat on eth0 > add a new default gw over the eth1 nic > > That is how you can do a multi vm setup that talk internally and > optionally use this eth1 network for routing too. > > > So, in the clusters I do I end with something like this: > > > http://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home/RAC_Attack_Automation#/media/File:RA_Arquitecture_step2.png > > and you can also forward a port to each VM > > So, not sure if that particular natservices is really needed, > > Alvaro > > On Wed, May 20, 2015 at 9:05 AM, Chris Almond <[email protected] > <javascript:>> wrote: > >> More clarification. For the custom NAT Network definition shown below >> (vbox preferences -> network), how do I specify using in Vagrantfile? >> >> Would it be something like this? config.vm.network :forwarded_port, >> :adapter >> => "2" (...for the second (custom) NAT adapter?) >> >> *vbox adapter type: vagrant network type:* >> "Host-only Adapter" = "private_network" >> "Bridged Adapter" = "public_network" >> "NAT" = "forwarded_port" >> *?--> "NAT Network1" = " ? "* >> >> >> <https://lh3.googleusercontent.com/-4lHYU-VGNrQ/VVui7PN8bxI/AAAAAAAAAI8/rkc_Kd23Vv4/s1600/natnetwork1.jpg> >> >> >> On Tuesday, May 19, 2015 at 1:21:42 PM UTC-7, Chris Almond wrote: >>> >>> Can anyone share examples that show how to specify use of the new "NAT >>> Network" option for network type? >>> >>> Virtualbox doc ref: *6.4. Network Address Translation Service >>> (experimental)* >>> https://www.virtualbox.org/manual/ch06.html#network_nat_service >>> >>> The goal is to use Vagrant to provision a cluster of boxes, all members >>> of the same custom defined NAT service, with DHCP providing address within >>> a set range for that NAT segment. >>> >>> Is this possible via vagrant? In my (minimal) research and >>> experimentation with Vagrant so far I'm finding that I need to use the new >>> NAT service type for this setup (instead of standard "NAT"). >>> >>> >>> >> Learn how WANdisco Fusion solves Hadoop data protection and scalability >> challenges <http://www.wandisco.com/hadoop/wd-fusion> >> >> Listed on the London Stock Exchange: WAND >> <http://www.bloomberg.com/quote/WAND:LN> >> >> THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY >> BE PRIVILEGED. If this message was misdirected, WANdisco, Inc. and its >> subsidiaries, ("WANdisco") does not waive any confidentiality or >> privilege. If you are not the intended recipient, please notify us >> immediately and destroy the message without disclosing its contents to >> anyone. Any distribution, use or copying of this e-mail or the information >> it contains by other than an intended recipient is unauthorized. The views >> and opinions expressed in this e-mail message are the author's own and may >> not reflect the views and opinions of WANdisco, unless the author is >> authorized by WANdisco to express such views or opinions on its behalf. >> All email sent to or from this address is subject to electronic storage and >> review by WANdisco. Although WANdisco operates anti-virus programs, it >> does not accept responsibility for any damage whatsoever caused by viruses >> being passed. >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/73b753c6-8336-4080-8502-5f00fb79d635%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
