mac 10.12.5
Vagrant 1.9.5
VirtualBox 5.1.22
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: 0
Your UID is: 501
try rm -r .vagrant.
I guess you copied or moved project folder from one place to another.
Actually You don't need to delete the .vagrant. You need to update the creator_uid file in .vagrant/
The file should be in: .vagrant/machines/web/virtualbox/creator_uid
You may also need to assign the ownership for .vagrant/machines/web to the new uid as well.
Read this for more information:
http://albertech.blogspot.com/2016/11/fix-vagrant-error-virtualbox-vm-was.html
In addition you may need to change ownership of other files in your VM install such as:
provisioning/site.retry
doesn't include repro, doesn't seem a vagrant issue
I faced the problem now.
$ vagrant destroy -f
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: 1001
Your UID is: 1000
I guess it is my responsibility, i suspect i made a mistake when i did some backup / restore long time ago.
Fact is i could not figure out the issue quickly.
Because it says it is not vagrant issue i was searching into virtualbox folders,
then i could not figure out which file was concerned (i was looking for something into ~),
so i lost time.
Finally i found this ticket and figured it out...
i suggest to improve that error message to make it more clear which files are concerned by the error.
I had this same issue after I deleted .vagrant.d
folder. Removing .vagrant
folder resolved it.
just learning vagrant, but I ran into this issue and notice my uid's matched in the file location, but did not print to console.
My issue was that I tried to vagrant ssh from a different directory than the one I booted the VM from. Changing to the directory the shared folder is located worked for me. Good thing for beginners to note.
Also related to the question, I noticed that the UID I was assigned trying as root level was 0, you must have set the UID while running as root and then wouldn't match UID when trying not at root level access.
That happens to me when the provisioning process was interrupted unexpectedly. And the usr id used to create the VM is NULL.
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:
Your UID is: 1000
I deleted .vagrant
folder resolved it.
Even though deleting .vagrant
folder solves the issue, I don't think it's the best option. I prefer updating the uid to that of the current user here .vagrant/machines/<machine_name>/virtualbox/creator_uid
.
@bteague change the UID at creator_uid worked like a charm. Nice solution.
Need to dosudo -i
and then direct to project directory, then I can run vagrant ssh
, and start VM
Would recommend people give @bteague 's suggestion a thought before blindly deleting the .vagrant folder.
The file should be in: .vagrant/machines/web/virtualbox/creator_uid
I recently copied all my VMs from a Macbook to a Windows SSD and started the re-configuration. It was much simpler for me to adjust the user ID in creator_uid
than to redo the whole folder structure.
The file should be in: .vagrant/machines/web/virtualbox/creator_uid
You may also need to assign the ownership for .vagrant/machines/web to the new uid as well.
Just correcting... "web" should be your vagrant VM name, in my case, "default". Hence:
vagrant/machines/default/virtualbox/creator_uid
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
try rm -r .vagrant.
I guess you copied or moved project folder from one place to another.