0
0

More than 5 years have passed since last update.

vagrant up 時にうまくいかなかった時の解決策

Posted at

 経緯

laravelのHomeSteadを使ってvagrant upを実行時にうまくいかなかったので、その時に発生したエラー内容とやったことをまとめようと思います。

エラー内容

The name of your virtual machine couldn't be set because VirtualBox
is reporting another VM with that name already exists. Most of the
time, this is because of an error with VirtualBox not cleaning up
properly. To fix this, verify that no VMs with that name do exist
(by opening the VirtualBox GUI). If they don't, then look at the
folder in the error message from VirtualBox below and remove it
if there isn't any information you need in there.

VirtualBox error:

書かれていること

  • バーチャルマシンの名前がすでに存在しているため、新しいバーチャルマシンを作ることができません

原因と思われることとやったこと

  • virtual box に同じ名前の複数バージョンが存在していた
    • 古いバージョンを削除
vagrant box list

でboxの一覧を確認

$vagrant box list
laravel/homestead (virtualbox, 7.0.0)
$ vagrant remove laravel/homestead --box-version 7.0.0

  • vmの保存先を削除
    • 以前作った、ものが必要なかったので削除
$ cd ~/VirtualBox\ VMs/
$  ls                                                                                                     火  1/29 00:12:04 2019
centos7_default_1528123984127_21822 develop_default_1536241538373_29606 webApp_default_1533732167317_74596
centos7_default_1535194345881_13627 homestead-7                         webApp_default_1545396593325_17456
$ rm -rf homestead-7

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0