I'm new to laravel/homestead/vagrant and really struggling. I have managed to download and run a demo program. I copied the demo folder to a new name and now want to get the copy running instead of the original, so that I can gradually start converting it into the program I want.
I modified the Homestead.yaml file in the new folder so the folders section looks like this:
folders:
- map: ~/LaravelProjects/MedAverter
to: /home/vagrant/code
sites:
- map: homestead.test
to: /home/vagrant/code/public
Then I suspend the running box, cd to the new folder, and do
vagrant up
But when I do
vagrant global-status
it shows the old one running, not the new one.
$ vagrant global-status
id name provider state directory
---------------------------------------------------------------------------------------
cd58265 homestead virtualbox running C:/Users/greg/LaravelProjects/travel-planet-crud
EDIT: Then I suspended that instance, and reloaded the new instance.
greg@DELL-DESKTOP MINGW64 ~/LaravelProjects/MedAverter (master)
$ vagrant suspend
==> homestead: Saving VM state and suspending execution...
greg@DELL-DESKTOP MINGW64 ~/LaravelProjects/MedAverter (master)
$ vagrant global-status
id name provider state directory
--------------------------------------------------------------------------------------
cd58265 homestead virtualbox saved C:/Users/greg/LaravelProjects/travel-planet-crud
$ vagrant reload --provision
==> homestead: Discarding saved state of VM...
==> homestead: Checking if box 'laravel/homestead' version '9.2.2-alpha1' is up to date...
greg@DELL-DESKTOP MINGW64 ~/LaravelProjects/MedAverter (master)
$ vagrant global-status
id name provider state directory
---------------------------------------------------------------------------------------
cd58265 homestead virtualbox running C:/Users/greg/LaravelProjects/travel-planet-crud
So you see, even though I'm in the new instance folder, something is still pointing it back to the old instance.
Maybe you can try to run vagrant reload --provision
It will restart your vagrant and apply any changes that you made.