WindowsでVagrant upを実行した際に以下のエラーが発生しました。
D:\vagrant\myCentOSVM>Vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'centos64'... C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/childprocess-0.6.3/lib/childprocess/windows/process_builder.rb:43:in `join': incompatible character encodings: Windows-31J and UTF-8 (Encoding::CompatibilityError) from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/childprocess-0.6.3/lib/childprocess/windows/process_builder.rb:43:in create_command_pointer' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/childprocess-0.6.3/lib/childprocess/windows/process_builder.rb:27:in `start' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/childprocess-0.6.3/lib/childprocess/windows/process.rb:70:in `launch_process' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/childprocess-0.6.3/lib/childprocess/abstract_process.rb:82:in `start' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/subprocess.rb:153:in `block in execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/safe_chdir.rb:26:in `block (2 levels) in safe_chdir' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/safe_chdir.rb:25:in `chdir' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/safe_chdir.rb:25:in `block in safe_chdir' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/safe_chdir.rb:24:in `synchronize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/safe_chdir.rb:24:in `safe_chdir' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/subprocess.rb:152:in `execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/subprocess.rb:22:in `execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/driver/base.rb:451:in `block in raw' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/driver/base.rb:450:in `raw' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/driver/base.rb:388:in `block in execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/retryable.rb:17:in `retryable' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/driver/base.rb:383:in `execute' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/driver/version_6_0.rb:71:in `import' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/action/import.rb:53:in `import' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/action/import.rb:13:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb:17:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/prepare_clone.rb:15:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/action/customize.rb:40:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:121:in `block in finalize_action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builder.rb:116:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/call.rb:53:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:121:in `block in finalize_action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/handle_box.rb:56:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:121:in `block in finalize_action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builder.rb:116:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/call.rb:53:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/after_trigger.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builder.rb:116:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `block in run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/busy.rb:19:in `busy' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `run' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:238:in `action_raw' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:209:in `block in action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:615:in `lock' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:195:in `call' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:195:in `action' from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
私の環境はWindowsをセットアップする際に、素直に自分の名前を入れてしまったので、ホームディレクトリ(でいいのかな…)が
C:\Users\ひろいん
となっています。
Vagrantをインストールすると、Vagrantの設定ファイルが
C:\Users\ひろいん\.vagrant.d
という場所に作られます。
.vagrant.dが日本語(Windows-31Jなのかな…)を含むディレクトリにあるとvagrant upが失敗します。
対処は以下の手順を踏みます。
1. .vagrant.dを日本語を含まないディレクトリに移す。例えば、D:\vagrant
2. 環境変数 VAGRANT_HOMEをD:\vagrant\.vagrant.dに変更する。自分の環境はWindows8です。Windows8では、コントロールパネル→システム→システムの詳細設定→環境変数システム環境変数の新規→変数名に「VAGRANT_HOME」、変数値に.vagrant.dを置いた場所(例:D:\vagrant\.vagrant.d)を書いてOK→もう一度コマンドプロンプトを立ち上げて、vagrant upを実行