A VirtualBox machine with the name 'homestead' already exists

前端 未结 30 3722
旧巷少年郎
旧巷少年郎 2020-12-02 04:58

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

相关标签:
30条回答
  • 2020-12-02 05:25

    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.

    0 讨论(0)
  • 2020-12-02 05:28

    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.

    0 讨论(0)
  • 2020-12-02 05:28

    I opened the virtualBox and then deleted homestead vm that was created earlier. It helped.

    0 讨论(0)
  • 2020-12-02 05:29

    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.

    0 讨论(0)
  • 2020-12-02 05:29

    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.

    0 讨论(0)
  • 2020-12-02 05:30

    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

    0 讨论(0)
提交回复
热议问题