Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
8
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

Organization

VagrantとVirtualBoxのVMとの関連が切れた時の対処法

環境

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)

参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
8
Help us understand the problem. What are the problem?