6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

`vagrant global-status` で Vagrant の状態が表示されないとき

Posted at

環境

macOS Sierra 10.12.1
Vagrant 1.8.6

対応

Vagrantfile のあるディレクトリの名前を変更したところ、vagrant global-status で Vagrant の状態が表示されなくなりました。
このような場合、vagrant global-status の一覧は

~/.vagrant.d/data/machine-index/index

にキャッシュされているので、このファイルに次のような JSON を追加することで表示されるようになります。

example
"a1bb980eb36a4a73a74a724794f201f8": {
    "local_data_path": "/path/to/foo/.vagrant",
    "name": "default",
    "provider": "virtualbox",
    "state": "poweroff",
    "vagrantfile_name": null,
    "vagrantfile_path": "/path/to/foo",
    "updated_at": null,
    "extra_data": {
        "box": {
            "name": "bento/centos-6.7",
            "provider": "virtualbox",
            "version": "2.2.7"
        }
    }
}

"a1bb980eb36a4a73a74a724794f201f8" の部分は

/path/to/foo/.vagrant/machines/default/virtualbox/index_uuid

に書かれた文字列をコピペすれば OK です。

6
2
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
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?