Kia ora, greetings from Wellington.

When there is no network, vagrant will always set eth0 as nat. nic1

So the first line of *.vm.network will be eth1 nic2, in your sample
private, and eth2 will be public nic3

then vagrant will by default create a port fwd between guest 22 over
nat, and local host over some port, say 2200

it will try to login as localhost:2200 that will be fwd to 10.0.2.5 or
some IP and port 22.

it's a chicken egg thing. Since vagrant need to ssh into the box to
configure nic2 (eth1) and nic3 (eth2)

you can override what IP to use, but that IP should start
automatically so Vagrant can use it.

This is on Virtualbox.

For vmware, the eth0 is on the private network, so you have several
VMs talking each other by this network.

For appliances, the real option left are pretty much, add a network
and tell vagrant to not configure it.. you set nothing, say no
hostname, no ip on any nic, and if you are using no plugins, it should
work, that is, the vm turns on, vagrant add the 2nd nic and that is.

that is what I can share without more information about the appliance.

Thanks
Alvaro.


On Tue, Jun 9, 2015 at 1:33 PM, Geraint Jones <[email protected]> wrote:
> Hi
>
> I am using vagrant to setup our dev env - for this we have 1 linux VM (all
> taken care of) and one "Appliance" VM.
>
> The appliance vm is totally closed and not much can be changed about it. One
> of the things that cant be changed is that its managment interface (with
> ssh) etc is on the second nic. I have tried a few variations on the below
> but just can get things working. What I need to happen is have NIC#2 be NAT
> - NIC#1 can be NAT or Private..
>
> ci.vm.network "private_network", ip: "10.0.1.3", virtualbox__intnet: "Dev
> Net", adapter: 1
> ci.vm.network "public_network", type: "nat"
> ci.vm.network "forwarded_port", guest: 443, host: 8081, adapter: 2
>
> No matter what I set type to it will setup the network as a bridge :(
>
> anyone else tackled this ?
>
> --
> 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/d/optout.

-- 
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/d/optout.

Reply via email to