Vagrant 没有启动.创建 VM 的用户与当前用户不匹配 [英] Vagrant Not Starting Up. User that created VM doesn't match current user

查看:16
本文介绍了Vagrant 没有启动.创建 VM 的用户与当前用户不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图启动我的 vagrant 机器,所以我导航到我的 vagrantfile 所在的文件夹,并使用:

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

vagrant up &&无业游民 ssh

vagrant up && vagrant ssh

但我收到以下错误消息:

but I got the following error message:

VirtualBox VM 的创建用户与当前运行 Vagrant 的用户.VirtualBox 要求同一用户用于管理已创建的 VM.请重新运行 Vagrant那个用户.这不是 Vagrant 问题.

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.

用于创建 VM 的 UID 为:0 您的 UID 为:501

The UID used to create the VM was: 0 Your UID is: 501

我也尝试过 sudo,但也没有用.

I also tried with sudo, but that didn't work either.

我需要切换 UID 吗?我该怎么做?

Do I need to switch UID's? And how would I do this?

推荐答案

我今天遇到了同样的问题.
我通过打开文件 .vagrant/machines/default/virtualbox/creator_uid 并将 501 更改为 0.

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.

在我保存文件后,命令 vagrant up 就像一个冠军.

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

注意:.vagrant 文件夹与你运行 vagrant up

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

这篇关于Vagrant 没有启动.创建 VM 的用户与当前用户不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆