How to debug “Vagrant cannot forward the specified ports on this VM” message

后端 未结 13 2741
时光取名叫无心
时光取名叫无心 2020-12-25 10:33

I\'m trying to start a Vagrant instance and getting the following message:

Vagrant cannot forward the specified ports on this VM, since they
would collide wi         


        
13条回答
  •  渐次进展
    2020-12-25 10:49

    You can see what vagrant instances are running on your machine by running

    $ vagrant global-status
    id       name    provider   state   directory
    ----------------------------------------------------------------------
    a20a0aa  default virtualbox saved   /Users/dude/Downloads/inst-MacOSX
    64bc939  default virtualbox saved   /Users/dude/svn/dev-vms/ubuntu14
    a94fb0a  default virtualbox running /Users/dude/svn/dev-vms/centos5
    

    If you don't see any VMs running, your conflict is not a vagrant box (that vagrant knows about). The next thing to do is to fire up the VirtualBox UI, and check to see if it has any instances running. If you don't want to run the UI, you can:

    ps -ef |grep VBox
    

    If you have VirtualBox instances running, they should be included in that output. You should be able to just kill processes that have VirtualBox in their output. One problem is that one of those processes seems to exist to do keep-alives. Just kill off the highest VirtualBox process. If you have a VirtualBox image running but vagrant doesn't know about it, some Vagrant directories may have been deleted manually, which means Vagrant loses track of the instance.

提交回复
热议问题