5
8

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とVirtualBoxのVMとの関連が切れた時の対処法

Last updated at Posted at 2016-06-22

環境

Mac OS X EI Capitan
Virtualbox 5.0.20
Vagrant 1.8.1

状況

VirtualBox上ではVMが表示されているのに、vagrant statusとやると、not createdになることが、たまにある

$ vagrant status
Current machine states:

default                   not created (virtualbox)

対処法

対象のVMのUUIDを調べる

$ VBoxManage list vms
...
"hoge" {xxxxxxx-xxxx-xxxx-xxxx-xxxxxx}

ファイル「.vagrant/machines/default/virtualbox/id」に、上記で取得したUUID({}で囲まれた部分)を記述

$ echo xxxxxxx-xxxx-xxxx-xxxx-xxxxxx > .vagrant/machines/default/virtualbox/id

vagrantのステータスが変わっていることを確認する

$ vagrant status
Current machine states:

default                   running (virtualbox)

参考

5
8
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
5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?