Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Homestead Boxes

I'm trying to install multiple of the same homestead box. Each one for a different project, totally isolated from each other. None of them will be run concurrently, only one at a time.

But when I try to run vagrant up, it tells me that a box with the name 'homestead-7' already exists. How can I rename it?

I don't see the name anywhere in the vagrantfile in the project directory, nor any 'boxes' folder in either the project .vagrant directory or my home .vagrant directory. vagrant global-status tells me that there is 1 homestead-7 box already for the project that is already in progress.

like image 415
cclloyd Avatar asked Oct 30 '17 17:10

cclloyd


2 Answers

You need to add "name" property under your "Homestead.yaml" file, for example:

name: my-new-homestead

and make sure that your authorize, keys and folders are pointing to the correct path.

like image 98
joemalski Avatar answered Sep 30 '22 19:09

joemalski


To use Homestead in a per project basis, you need to add it as a dependency in each one of your projects:

composer require laravel/homestead --dev

Use php vendor/bin/homestead make to generate the Vagrantfile and Homestead.yaml files. Then you can simply run vagrant up from your project.

See more on the Laravel documentation.

like image 45
Camilo Avatar answered Sep 30 '22 20:09

Camilo