A VirtualBox machine with the name 'homestead' already exists
I solved by using vboxmanage
to get the ID of the VM.
$ vboxmanage list vms
"my-vm" {c700b8b6-b766-4638-871b-736b44b7db18}
Copy the ID of the desired VM (the c700…db18
string) into the contents of ~/.vagrant/machines/default/virtualbox/id
. Save the file then run vagrant up
to get the vm working without having to destroy it.
For me, the machine was not showing up as an active VM in the VirtualBox application. To fix I had to do this:
vagrant global-status
This gave me the ID of the machine that I needed to destroy. With the ID, run:
vagrant destroy {VM ID}
I had to run that in sudo to actually destroy the machine. At that point, I was able to run
vagrant up
From the following message :
A VirtualBox machine with the name 'vm_name' already exists. Please use another name or delete the machine with the existing name, and try again.
I listed current running virtual machines from the command line :
VBoxManage list vms
Result :
"vm_name" {8ba467b7-da96-4f68-9bf8-671dd6f0d007}
Then proceeded with the removal of the offending virtual machine :
VBoxManage unregistervm 8ba467b7-da96-4f68-9bf8-671dd6f0d007 --delete
You probably have a virtualbox running! Open the programme virtualbox and shut down the other virtualbox ;) http://smallbusiness.chron.com/shut-down-virtualbox-43657.html
If this isn't working then you might want to delete the old homestead folder and place all your projects in the new folder ;)
I'm a bit late to the party on this, but for anyone else having this issue SergioPeluzzi came closest, but didn't get the cigar with this:
Seek for vb.name = settings["name"] = "homestead" line and changed "homestead" to "HOMESTEAD" and "vói lá"
The line is actually:
vb.name = settings["name"] ||= "homestead"
As you can see from the bit that says settings["name"], you just need to add a name field to your Homestead YAML file, e.g.
memory: 2048
cpus: 1
provider: virtualbox
name: my-sexy-homestead-box