背景
Macの容量がいっぱいになってきたのと,Mac内のファイル整理も兼ねてMacをクリーンインストールしました.
最近Ansibleを触る機会があったので,どうせならとMacのプロビジョニングをAnsibleで行いました.
問題
VirtualBoxやVagrantもAnsibleでhomebrewを叩いてインストールをして,いざvagrant upしようとしたらエラーがでました.
$ 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: 502
Your UID is: 501
解決方法
簡単に記述すると,virtualboxのUIDは502と記述されてますが,あなたのは501ですよ
ということらしいです.
従って,以下のコマンドを打って,502を501に変更したら解決します.
vim .vagrant/machines/default/virtualbox/creator_uid