Vagrant Not Starting Up. User that created VM doesn't match current user

前端 未结 14 1139
抹茶落季
抹茶落季 2020-12-22 18:44

I was trying to start up my vagrant machine, so I navigated to the folder where my vagrantfile is, and used:

vagrant up && vagrant ssh

but I got the

相关标签:
14条回答
  • 2020-12-22 18:54

    Remove the content of .vagrant hidden dir in the current working dir and re-run vagrant up command. Error, because of copy / backup of Vagranfile /s from one system to another system. user id's mismath to the Vagrant to bring up the environment.. hope it helps cheers..!! :)) if u don't wish to delete that folder u can update uid of current user in file in the hidden dir of current working dir, i.e .vagrant/machines/jenkins/virtualbox$ vim creator_uid

    0 讨论(0)
  • 2020-12-22 18:55

    I ran into the same problem today.
    I edited my UID by opening the file .vagrant/machines/default/virtualbox/creator_uid and changing the 501 to a 0.

    After I saved the file, the command vagrant up worked like a champ.

    NB: the .vagrant folder is in the same directory as your Vagrantfile, where you ran vagrant up

    0 讨论(0)
  • 2020-12-22 18:55

    I've faced the same situation, but I have a multi-machine Vagrantfile.

    To replace the old uid (1001) by the new one (1000) I've used the following command:

    for i in $(find . -type f -iname "creator_uid" ) ; do echo 1000 > $i ; done
    
    0 讨论(0)
  • 2020-12-22 19:00

    I have Multi-Machine vagrant file. I have checked the creator_uid and it is 0 but still unable to load. So I have deleted creator_uid file for all the Multi-Machine and it worked. Path should be .vagrant\machines\<machine_name>\virtualbox

    0 讨论(0)
  • 2020-12-22 19:02

    Just to add on to Fred's https://stackoverflow.com/a/32256848/2065804 answer.

    Make sure you changed the correct VM's machine. For example, my VM name is NOT default but rather called homestead-7.

    So the path to the correct one is:

    .vagrant/machines/homestead-7/virtualbox/creator_uid
    

    and not:

    .vagrant/machines/default/virtualbox/creator_uid
    

    This error happened to me when I changed my Mac to another Mac.

    0 讨论(0)
  • 2020-12-22 19:03

    I tried changing the id in .vagrant\machines\default\virtualbox\creator_uid and that did not work for me but deleting the file, creator_uid did the trick.

    0 讨论(0)
提交回复
热议问题