Vagrant環境の起動(Vagrant up)を実行した所、
以下メッセージで起動に失敗した時の復旧方法になります。
-----------------------------------------------------------------------
C:\HashiCorp\Vagrant\localdev>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Your VM has become "inaccessible." Unfortunately, this is a critical error
with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox
and clear out your inaccessible virtual machines or find a way to fix
them.
C:\HashiCorp\Vagrant\localdev>
-----------------------------------------------------------------------
VirtualBox上で確認すると、「アクセスできません」というステータスで
操作できなくなっているようです。
同様の現象の場合はお試しあれ。
以下メッセージで起動に失敗した時の復旧方法になります。
-----------------------------------------------------------------------
C:\HashiCorp\Vagrant\localdev>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Your VM has become "inaccessible." Unfortunately, this is a critical error
with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox
and clear out your inaccessible virtual machines or find a way to fix
them.
C:\HashiCorp\Vagrant\localdev>
-----------------------------------------------------------------------
VirtualBox上で確認すると、「アクセスできません」というステータスで
操作できなくなっているようです。
ここで、
対象のVirtualBox用ディレクトリにある仮想マシンイメージファイル(.vox)
の「xxxxxx.vbox-tmp」を「xxxxxx.vbox」にリネームして、
Virtualboxを再起動すると「中断」状態で正常認識されました。
![](http://2.bp.blogspot.com/-yFo20WsKGFM/UuBivCH72bI/AAAAAAAAMl4/29o5jCvgswo/s1600/20140123092857.jpg)
この状態で再度vagrantupを実行すると正常起動を確認できました。
-----------------------------------------------------------------------
C:\HashiCorp\Vagrant\localdev>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => xxxx (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
-----------------------------------------------------------------------
Virtualbox上でも正常起動が確認できました。
![](http://1.bp.blogspot.com/-Jpx4LFPPrKY/UvB21soyTqI/AAAAAAAAMqI/TXTqkXqee7s/s1600/vagrantup_ok.jpg)
直前にvagarant halt実行しないまま、うっかりPCシャットダウンしてしまったので、間違いなくそれが原因だと思います。。
この時、起動時に参照するべきVirtualBox用仮想マシンイメージファイル(.vox)が正常終了していないためにtmpファイルとして別名保存されていたようです。
対象のVirtualBox用ディレクトリにある仮想マシンイメージファイル(.vox)
の「xxxxxx.vbox-tmp」を「xxxxxx.vbox」にリネームして、
Virtualboxを再起動すると「中断」状態で正常認識されました。
![](http://2.bp.blogspot.com/-yFo20WsKGFM/UuBivCH72bI/AAAAAAAAMl4/29o5jCvgswo/s1600/20140123092857.jpg)
この状態で再度vagrantupを実行すると正常起動を確認できました。
-----------------------------------------------------------------------
C:\HashiCorp\Vagrant\localdev>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => xxxx (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
-----------------------------------------------------------------------
Virtualbox上でも正常起動が確認できました。
![](http://1.bp.blogspot.com/-Jpx4LFPPrKY/UvB21soyTqI/AAAAAAAAMqI/TXTqkXqee7s/s1600/vagrantup_ok.jpg)
直前にvagarant halt実行しないまま、うっかりPCシャットダウンしてしまったので、間違いなくそれが原因だと思います。。
この時、起動時に参照するべきVirtualBox用仮想マシンイメージファイル(.vox)が正常終了していないためにtmpファイルとして別名保存されていたようです。
同様の現象の場合はお試しあれ。