I think the way you are approaching is causing you so much troubles.
1. At this moment, and until that change, the virtualbox provider will use
eth0 as nat.
2. at the boot time, the port forwarders and the nics are cleared out and
reconfigured
3. all the reconfiguration is done by the forwarded port done in 1.
so you have a chicken egg you are trying to break, but the way it is, it
works, just you want to make it work diffeerently.
I think at the moment, you should have 2 configuration blocks, one for the
destop/virtualbox and other for your cloud provider.
I did test those config.ssh.port/host and wasn't able to make them work due
the point 1 and 2.
After chekcing past issues, I can see you have been months trying to get
those to work, however.
I thing the best way to go is the 2 block for virtualbox and cloud.
Alvaro.
On Sun, Feb 9, 2014 at 4:17 PM, Alan Pinstein apinst...@mac.com wrote:
Actually you have to disable the custom ssh host port, as with the
private networking and custom ssh, the default ssh port-forwading doesn't
run, and the box is inaccessible...
On Saturday, February 8, 2014 10:11:11 PM UTC-5, Alan Pinstein wrote:
Actually, now that I try it with a real setup, I don't see how using:
config.ssh.host = [private network ip]
ever works... because in this situation, vagrant will always kill the
private network on all runs 2..n trying to re-configure the network... see
log below.
INFO ssh: Attempting SSH connnection...
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 33.33.33.50
INFO ssh: - Port: 1855
INFO ssh: - Username: vagrant
INFO ssh: - Key Path: [/Users/apinstein/.vagrant.d/
insecure_private_key]
INFO subprocess: Starting process: [/usr/bin/VBoxManage, showvminfo,
9e49fd36-ef99-49df-9219-b1b867e2ee64, --machinereadable]
INFO ssh: SSH is ready!
INFO interface: info: Machine booted and ready!
[default] Machine booted and ready!
INFO warden: Calling IN action: #VagrantPlugins::
ProviderVirtualBox::Action::CheckGuestAdditions:0x0100f8a0d8
INFO subprocess: Starting process: [/usr/bin/VBoxManage,
guestproperty, get, 9e49fd36-ef99-49df-9219-b1b867e2ee64,
/VirtualBox/GuestAdd/Version]
INFO warden: Calling OUT action: #VagrantPlugins::
ProviderVirtualBox::Action::CheckGuestAdditions:0x0100f8a0d8
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::
WaitForCommunicator:0x0100f880a8
INFO warden: Calling OUT action: #VagrantPlugins::
ProviderVirtualBox::Action::Customize:0x0100f80060
INFO warden: Calling OUT action: #VagrantPlugins::
ProviderVirtualBox::Action::Boot:0x0100f800b0
INFO warden: Calling OUT action: #VagrantPlugins::
ProviderVirtualBox::Action::Customize:0x0100f80178
INFO warden: Calling OUT action: #VagrantPlugins::
ProviderVirtualBox::Action::SaneDefaults:0x0100ed1100
INFO warden: Calling OUT action: #Vagrant::Action::Builtin::
SetHostname:0x0100ed1150
INFO warden: Calling OUT action: #VagrantPlugins::
ProviderVirtualBox::Action::ForwardPorts:0x0100ed12e0
INFO subprocess: Starting process: [/usr/bin/VBoxManage, showvminfo,
9e49fd36-ef99-49df-9219-b1b867e2ee64, --machinereadable]
INFO interface: info: Configuring and enabling network interfaces...
[default] Configuring and enabling network interfaces...
INFO ssh: SSH is ready!
INFO guest: Execute capability: configure_networks (redhat)
INFO ssh: SSH is ready!
INFO guest: Execute capability: network_scripts_dir (redhat)
INFO ssh: Execute: /sbin/ifdown eth1 2 /dev/null (sudo=true)
INFO subprocess: Starting process: [/usr/bin/VBoxManage, showvminfo,
9e49fd36-ef99-49df-9219-b1b867e2ee64, --machinereadable]
INFO subprocess: Starting process: [/usr/bin/VBoxManage, showvminfo,
9e49fd36-ef99-49df-9219-b1b867e2ee64, --machinereadable]
INFO ssh: Execute: echo; printf $SSH_AUTH_SOCK (sudo=false)
INFO subprocess: Starting process: [/usr/bin/VBoxManage, showvminfo,
9e49fd36-ef99-49df-9219-b1b867e2ee64, --machinereadable]
INFO subprocess: Starting process: [/usr/bin/VBoxManage, showvminfo,
9e49fd36-ef99-49df-9219-b1b867e2ee64, --machinereadable]
INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-UqBfSa1371/agent.1371
[hangs ssh vagrant@33.33.33.50 will never work b/c vagrant just ran
`/sbin/ifdown eth1` ]
Right?
On Saturday, February 8, 2014 9:47:43 PM UTC-5, Alan Pinstein wrote:
I should add.. I'm not really concerned about security with VirtualBox
provider, but we wanted to start trying out Vagrant to bootstrap our cloud
instances, and thus I wanted to automate moving of the ssh port.
That said, is there a place/way to put a block code that only runs on
certain providers? So that way I could locate the code that kills port 22
ssh in certain providers. My concern here is that even if I could do this,
wouldn't I still have the same problem but just on that provider?
I really think the fix here is to make vagrant's network munging much
more robust. Change