vagrant up でYour VM has become "inaccessible." Unfortunately, this is a critical errorと出た場合
一旦落ち着くことが大切ね
vagrantを使っていて、いつも通りvagrant upをしたら
vagrant : Your VM has become "inaccessible." Unfortunately, this is a critical error 発生場所 行:1 文字:1 + vagrant up + ~~~~~~~~~~ + CategoryInfo : NotSpecified: (Your VM has bec... critical error :String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualB ox and clear out your inaccessible virtual machines or find a way to fix them.
と出て何もできなくなってしまいました。 とりあえず「vagrant status」をおすと
Current machine states: default inaccessible (virtualbox) The VM is inaccessible! This is a rare case which means that VirtualBox can't find your VM configuration. This usually happens when upgrading VirtualBox, moving to a new computer, etc. Please consult VirtualBox for how to handle this issue. PS C:\Users\nonak\MyVagrant\MyCentOS> vagrant suspend
と出てくるどうやらVirtualBoxの問題らしい、、、 いろいろ調べたら解決法が見つかりました。
VirtualBoxのVMが格納されてるディレクトリのファイルの拡張子を変更します。 VMとは[Virtual Machine]という意味です。
Windowsの場合 C:Users/ユーザー名/VirtualBox/VM名
この中に入っているVM名.vbox-tmpの拡張子をVM名.vboxに変えればOK
あとはvagrant upをすればいつも通りに戻るはずです。
以下サイトを参考にさせて頂きました。 どうやらPCをシャットダウンする前にしっかりとvagrantを終了していないことが原因のようですね、以後気をつけます!
いやー、、焦った~