In case of ssh port, Vagrant solves port collisions by itself:
==> ubuntu64: Fixed port collision for 22 => 2222. Now on port 2200.
However, you still can create unavoidable collision by:
- Creating first vagrant env (it will get port 2222 for ssh)
- Suspend that env (
vagrant suspend
) - Create second vagrant env (it will again get port 2222, since it is now unused)
- Try bringing first environment up again by
vagrant up
You will get the error message you are getting now.
The solution is to use vagrant reload
, to let vagrant discard virtual machine state (which means it will shut it down the hard way – so be careful if you have any unsaved work there) and start the environment again, solving any ssh port collisions on the way by itself.