Vagrant コマンド実行時の詳細なログの出し方
ターミナルなどで vagrant
コマンド 実行時に、なにかよくわからずコマンドが終了してしまう場合。
たとえば、こんなエラー状況。
$ vagrant box add --name NewMyBox ./mybox-CentOS7.2-x86_64.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'NewMyBox' (v0) for provider:
box: Unpacking necessary files from: file:///Users/precure/projects/magical/mybox-CentOS7.2-x86_64.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
$ # なにもエラーメッセージがないやんけ!!
方法
環境変数 VAGRANT_LOG
に値を設定すればよい。
Mac
$ VAGRANT_LOG=debug vagrant somecommand ...
Windows
> set VAGRANT_LOG=DEBUG
> vagrant somecommand ...