I currently have a vagrant
environment where each VM has a port forwarding rule setup from host to guest. However the problem with this forwarding rule is that I cannot have multiple VMs running via vagrant at the same time with similar port forwarding rules.
It seems like I'll need some sort of a proxy for ports to handle this. Is there something that is already baked into vagrant/virtualbox that could support this?
Traceback from Vagrant when I try running another VM with the same forwarding rules:
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 8000 is already in use
on the host machine.
To fix this, modify your current projects Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:
config.vm.network :forwarded_port, guest: 8000, host: 1234
Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.