-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Port-forwarding collision when bringing up suspended instances #1740
Comments
I'm experiencing the same issue OS X 10.8.3 |
👍 Tangent: I even tried setting this up with |
Ah hah. So this is unfortunately working as intended for VirtualBox. VirtualBox doesn't support changing forwarded port mappings when the VM is not powered off. Therefore, you must do a full If you use the VMware provider, the forwarded ports will auto-correct because it does support changing these while the VM is suspended. |
Is there any way to define this when creating the vm? I have two vm's for two different repos that need to be able to run at the same time, but setting the port as @searls tried doesn't work. Any way to change 2222 as the default port |
I'm on the same boat with @searls and @flomotlik. Is there a way to change the SSH port? |
This configuration worked for me. I was able to start two different VMs from suspend using a different SSH host port.
https://groups.google.com/forum/#!topic/vagrant-up/HwqFegoCXOc |
That seems to work well. Thanks @dmp1ce! |
For the record, I do seem to be able to delete and recreate port-forwards on suspended vm's with VirtualBox 4.3.
|
I'm not sure I understand why vagrant can't change the port forwards for a suspended VirtualBox machine if the |
Same issue on OSX. After you set the host port to something else in the Vagrantfile, it seems you need to run |
I'm still experiencing the #1472 issue when bringing up machines with saved state. The SSH forwarding ports collide and Vagrant bails.
vagrant reload
(orvagrant halt && vagrant up
) gets it to detect and fix the port collision.Environment:
Reproduction:
Result:
Expected:
Vagrant notices the port collision and switches the port forwarding, allowing vm A to be brought up.
The text was updated successfully, but these errors were encountered: