Reputation: 5405
I have set up vagrant VM in a Dropbox folder (at Linux)
$ vagrant up
$ vagrant ssh
Now I want to access it from OS X:
$ 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: 1000 Your UID is: 501
Does it mean NO officially?
This VM is provided by VirtualBox and I have it installed on both machine.
How do I access it from different operating system?
Upvotes: 0
Views: 471
Reputation: 1820
The vagrant machine was created with a user with uid 1000, but the user trying to login to the machine has an uid of 501.
Reason: The uid of the user's from Linux and OS X are different. As, vagrant find the uid to be different, the above error is thrown.
Explanation: The uid of Linux user is 1000 and the uid of OSX user is 501.
So, if a vagrant box is created from Linux, the uid for the vagrant box is marked as 1000. After rebooting to OSX, when you try to start the instance, vagrant identifies a different uid (501 from OSX), because of which vagrant denies access to the machine.
Solution:
Edit the file .vagrant/machines/default/virtualbox/creator_uid
and change 1000 to 501. Reload vagrant machine and ssh into the machine. The .vagrant folder is in the same folder as Vagrantfile.
Upvotes: 0