A connection with the name you specified already exists

后端 未结 5 718
深忆病人
深忆病人 2021-01-31 20:42

I am setting up my previously working vagrant environment in Windows 10. I\'ve updated to the newest version of both VirtualBox (https://www.virtualbox.org/ticket/14040) and Vag

5条回答
  •  佛祖请我去吃肉
    2021-01-31 21:02

    Right, I've spent a lot of time trying to resolve this. And I finally came across a post on the laracasts forum:

    I've been able to get Homestead up and running after a day of troubleshooting with the following steps:

    Installed the VirtualBox 5.0.1 test build https://www.virtualbox.org/download/testcase/VirtualBox-5.0.1-101902-Win.exe Information at: https://www.virtualbox.org/ticket/14040

    I also reinstalled Vagrant 1.7.4

    This solved the initial issue with VirtualBox, but presented another issue. When I attempted to "vagrant up" I would get a pop-up error message from VirtualBox about not being able to rename the connection, the VM wouldn't boot, and I would get the error message that @antonybudianto posted in terminal.

    I applied a suggestion made by Venimus in this thread: https://github.com/mitchellh/vagrant/issues/6059

    I edited line 17 in /Homestead/scripts/homestead.rb as follows:

    config.vm.network "private_network", ip: "192.168.10.10", name: "VirtualBox Host-Only Ethernet Adapter #3"
    

    Apparently the trick is to include the name of the host-only adapter that you've already set up in VirtualBox. By doing this, you prevent Vagrant from attempting to rename the connection. You just need to make sure that the name matches the name of your adapter in Windows. Also, go into the VirtualBox GUI and make sure that the host-only adapter is on the same network, but not the same ip. My homestead is 192.168.10.10, my VirtualBox host-only adapter is set to 192.168.10.9.

    This seems to be working well for me, and has the advantage of not changing your Vagrant install at all. It's a Homestead-only modification.

    https://laracasts.com/discuss/channels/general-discussion/windows-10-vagrant-virtualbox-homestead/replies/87037

    It has worked for me. Do note this part:

    You just need to make sure that the name matches the name of your adapter in Windows. Also, go into the VirtualBox GUI and make sure that the host-only adapter is on the same network, but not the same ip. My homestead is 192.168.10.10, my VirtualBox host-only adapter is set to 192.168.10.9.

    Hope it helps.

提交回复
热议问题