A connection with the name you specified already exists
Asked Answered
T

5

16

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.

Trisa answered 4/8, 2015 at 20:49 Comment(1)
I am also in the same boat as you. Haven't found a solution yet.Shaneka
J
13

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.

Judicial answered 1/11, 2015 at 5:0 Comment(4)
thank you very much, this is the only solution which worked for meAnglicanism
yep, this fixed the issue in win 10Reward
<3 My god, this has wasted 3 hours for me. Thank you so much and thank you for to the author of the workaround.Frustrate
Nope! It doesn't work for me... In my case it was much more simpler to solve this... only one step, here the answer that works to me: https://mcmap.net/q/750732/-docker-toolbox-quick-start-fails-with-vboxmanage-exe-error-in-windows-10Numerate
S
4

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.

Shaneka answered 6/8, 2015 at 21:19 Comment(4)
Unfortunately I am not using homestead. I tried naming the adapter but got snagged on errors: The specified host network could not be found: 'VirtualBox Host-Only Ethernet Adapter.' If the name specification is removed, Vagrant will create a new host only network for you. Alternatively, please create the specified network manually.Trisa
Ah :( Have you tried the latest test build? virtualbox.org/wiki/TestbuildsShaneka
Ended up just rolling back to 8.1 until virtualbox gets a stable release for 10. Hopefully the latest test build works for anyone stumbling onto this question.Trisa
Did help me. Win 10, vagrant 1.7.4, Virtualbox 5.0.2 r102096. Thanks. :-)Matrilocal
G
0

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

Gallman answered 28/5, 2016 at 18:47 Comment(0)
B
0

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

Bawcock answered 4/8, 2017 at 13:27 Comment(0)
O
-2

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. :)

Oversleep answered 16/9, 2015 at 5:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.