1
我目前有一個vagrant
環境,其中每個VM都有一個從主機到來賓的端口轉發規則設置。然而,這個轉發規則的問題是我不能讓多個虛擬機同時通過流浪者運行,並且具有相似的端口轉發規則。使用相同端口轉發規則的多個VM的端口轉發
看來我需要某種端口代理來處理這個問題。有沒有東西已經融入了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.