Sanoob
Sanoob

Reputation: 2474

How to fix wrong vagrant box name for homestead

I installed homestead box manually but I made a mistake in box name during installation. Instead of laravel/homestead I gave only homestead Now my vagrant box list gives

homestead (virtualbox, 0)

So I tried renaming homestead folder name in ~/vagrant.d/boxes. But / is not allowed due to that I tried to put homestead folder inside a folder laravel but then vagrant not detecting the box.

Is there any solution to rename my box to laravel/homestead without adding the box again. ? I don't have that box and vagrant box super slow 20Kbps in my region.

Due to this wrong name homestead project is not detecting the box so trying to download it again.

My sys config is MacbookAir.

Upvotes: 2

Views: 1069

Answers (1)

Sanoob
Sanoob

Reputation: 2474

I got the solution

Slow solution

Repacking a box then adding package.box with correct name is another way

vagrant box repackage homestead virtualbox 0 --> To make a package from installed box

And then add this package with correct name

vagrant box add laravel/homestead ./package.box

Fast method

After adding the correct box name I checked boxes folder to know how they implemented the / is box name

Got to boxes folder, By default it would be ~/.vagrant.d/boxes

Then rename the folder like this

mv homestead laravel-VAGRANTSLASH-homestead

To conclude -VAGRANTSLASH- is used to add / in the box name

Upvotes: 2

Related Questions