【发布时间】:2013-12-11 21:23:51
【问题描述】:
我目前有一个vagrant 环境,其中每个虚拟机都有一个从主机到来宾的端口转发规则设置。但是,此转发规则的问题在于,我不能同时通过 vagrant 运行多个具有类似端口转发规则的虚拟机。
看来我需要某种端口代理来处理这个问题。是否有一些已经融入 vagrant/virtualbox 的东西可以支持这一点?
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.
【问题讨论】:
标签: virtualbox vagrant