1. I have an official box that uses sshd on port 22, that could be https://app.vagrantup.com/centos/ https://app.vagrantup.com/fedora/ https://app.vagrantup.com/ubuntu, anything 2. I start guest using that box with Vagrant and reconfigure sshd on the guest to listen on a different port (222). This is for example due to starting another service on port 22 on the guest. The new service on port 22 does not need to exposed to the Vagrant host. 3. I want now Vagrant to know about this change after I reload the same box, by passing environment variables to Vagrantfile or some other way 4. After creating a set of scripts that configure my box (ansible, puppet, docker, ...) this way, I can now use them on a physical host, VM not managed by Vagrant, or a VM managed by Vagrant, all having sshd on port 222
I think I'm clear enough, if not try my Vagrantfile. Best regards, Marcin On Saturday, December 2, 2017 at 4:41:37 PM UTC+1, Alvaro Miranda Aguilera wrote: > > Vagrant will create a local port say on 2222 for the first box > > When tries for the 2nd port, will try 2222 used? Then 2223 or other > > So still not clear whats the benefit or requirement on doing this. > > Is this really needed? Why? > > And what are those boxes you mention? > > Alvaro > > > -- 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 vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/23c69ff1-0157-419d-b548-fddabaa2b876%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.