Windows8、VagrantでVirrtual machine VM起動時のトラブルシューティング記録。
なぜ、WindowsはVirrtual machine使うのがこうもめんどくさいのか…
・UID競合問題
エラーメッセージ
$ vagrant up
The VirtualBox VM was created with a user that doesn't match the
current user running Vagrant. VirtualBox requires that the same user
be used to manage the VM that was created. Please re-run Vagrant with
that user. This is not a Vagrant issue.
The UID used to create the VM was: 505
Your UID is: 0
なんでかはわからんが、UIDで競合が起きている。
私の場合、初回で起きたが、調べたところ、たまに起きることがあるらしい。
VagrantのVMを作成したUIDを保有しているファイルを修正して対応。
こちらのファイルを修正。.vagrant/machines/default/virtualbox/creator_uid
Vagrantfileがあるフォルダ内の隠しファイル下にあります。
こちらを開くと、VMが認識しているUIDが表示されます。
505 が表示されていて、それが現在のUIDと一致していないため、エラーが起きている。
vi creator_uid で開いて
0 に修正する。
修正後、Vagrantfileがあるフォルダに戻り、vagrant upでVirtual machineを起動できる。
・謎
参考にさせてもらったページだと、UIDを0→1001に修正している。
これは、自分がした数値とは逆だが、何故だ…(´・ω・`)
参考URL
https://qiita.com/shinyay/items/fbe53ce2ce1029f1914f