Since homestead 2.0 homestead laravel has not been working
I don\'t know why \'homestead init\' creates a Homestead.yaml file in mydirectory/.homestead and not in
Sometimes you might not want to delete old box. Yesterday may old Vagrant has broken, I've updated Vagrant and Virtualbox but folders mapping didn't work. I wanted to run new box and had this error.
I didn't want to remove old box (because I wanted to run some backups) but I wanted to run new box. The solution was running VirtualBox, right click on Homestead machine and choose Settings and then changing name from homestead
to homestead_old
.
After that I was able to install homestead but had this old machine and could also run this to make any backups I needed.
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.
I opened the virtualBox and then deleted homestead vm that was created earlier. It helped.
After a few hours of troubleshooting, nothing else worked for me, as no one mentioned this little detail.
Depending on your privileges at the time of installation, you may need to run virtualbox as an administrator. It was only when I did this that I saw my vagrant boxes in the list of virtual machines.
I then proceeded to remove my virtual machine named homestead
from virtualbox, and the problem was solved.
In my case, nothing was indicating that the VM "already exists" besides that error message. Nothing on VirtualBox UI, nothing returned by “vboxmanage list vms”, nothing through “vagrant global-status”, it didn’t exist in “.vagrant.d\boxes” and so on. I resolved it by manually creating a new same-name VM in the VM VirtualBox Manager (using the “new” button + accepting all the defaults), and then removing it (right-click > remove). After that, the “vagrant up” worked as expected.
vagrant box list
vagrant box remove laravel/homestead
vagrant global-status
vagrant destroy nameOfYourBox
Open your VirtualBox and delete all itens of your homestead
vagrant up