A connection with the name you specified already e

2019-03-09 03:32发布

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 Vagrant.

When I vagrant up I get an error: Cannot rename this connection. A connection with the name you specified already exists. Specify a different name.

I've since tried deleting all of my boxes, deleting the .vagrant and .virtualbox directories, reinstalling both virtualbox and vagrant. Yet, I always get the same error. Here is the error message from my console:

The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again.

If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine, since the GUI often has more helpful error messages than Vagrant can retrieve. For example, if you're using VirtualBox, run vagrant up while the VirtualBox GUI is open.

The primary issue for this error is that the provider you're using is not properly configured. This is very rarely a Vagrant issue.

5条回答
仙女界的扛把子
2楼-- · 2019-03-09 03:52

Uninstall VirtualBox using CCLeaner then remove virtual adapter if it still exist from network and sharing center. For remove try using Device Manager and find networks and find the virtualbox adapters and remove them.

Then finally install it and don't launch it. Go to installation folder and right click on it and run it as Administrator.

:)

Njoy... Happy coding. :)

查看更多
在下西门庆
3楼-- · 2019-03-09 03:53

This problem appears on my Windows 7, using vagrant 1.9.6 and VirtualBox 5.1.22. The problem was that I previously removed some of the Host-Only adapters. A workaround for this problem was to change the IPv4 address of existing Host-Only adapter to match the VagrantFile configuration:

  • look for IP in Vagrantfile for config.vm.network:

    config.vm.network "private_network", ip: "192.168.42.10"

  • modify the IPv4 address of existing Host-only adapter to match the IP. Got to VirtualBox -> File -> Preferences -> Network -> Host-only Networks - > right click on VirtualBox Host-Only Ethernet Adapter (Edit Host-only Network). Change IPv4 address to:

    192.168.42.1

查看更多
Lonely孤独者°
4楼-- · 2019-03-09 03:54

You have to uncheck the actual Ethernet network adapter by click rightclick >> Properties>> uncheckbox for virtualBox NDIS6 Brdige Networking Drive

so you have to check that checkbox on Virtual adapter only

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-03-09 03:59

I had the same issue with Scotchbox, and even after installing the test build the issue was still there.

This is how I fixed the issue.

Step 1: Download and install https://www.virtualbox.org/attachment/ticket/14040/VBox-Win10-fix-14040.exe and leave it running in the background

Step 2: Head to the Virtual box program files ( C:\Program Files\Oracle\VirtualBox ).

Step 3: Go to compatibility for these three .exe ( Virtualbox.exe, VBoxHeadless.exe, and VBoxManage.exe ) and choose windows 7.

Then just run vagrant up again and it should work.

查看更多
别忘想泡老子
6楼-- · 2019-03-09 04:12

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.

查看更多
登录 后发表回答