【问题标题】:VirtualBox VM was created with a user that doesn't match the current user running VagrantVirtualBox VM 是使用与当前运行 Vagrant 的用户不匹配的用户创建的
【发布时间】:2016-08-06 19:05:08
【问题描述】:

我是 Windows 新手。我使用的是 Windows 10。当我在我的机器上运行 vagrant 时,UID 存在一些问题。请查看图片了解更多信息。

当我运行 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 as 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: 0

【问题讨论】:

标签: windows vagrant virtualbox vagrant-windows


【解决方案1】:

看起来您是以 sudo 身份登录的,因此 UID 不同。退出 sudo 并以普通用户身份尝试 vagrant up。

如果上述方法不起作用,请更新以下文件

vi .vagrant/machines/default/virtualbox/creator_uid

在里面加0

如果这有帮助,请告诉我。

【讨论】:

    【解决方案2】:

    找到这条路径,改成0。

    .vagrant/machines/default/virtualbox/creator_uid

    【讨论】:

      【解决方案3】:

      在 Windows 文件夹中。 Vagrant 与 Vagrantfile 位于同一文件夹中。 由于默认不可用,因此您可能必须在每个 vm 中进行编辑,但路径相同:vagrant/machines/(name of the vm)/virtualbox/creator_uid

      【讨论】:

        【解决方案4】:

        删除当前工作目录中的 .vagrant 目录并重新运行 vagrant up 命令。 错误,因为将 Vagranfile /s 从一个系统复制/备份到另一个系统。用户 id 对 Vagrant 提出环境的误解.. 希望它有助于欢呼.. !! :))

        【讨论】:

          【解决方案5】:

          当我第一次以提升的权限(管理员)使用 vagrant up 时,这发生在我身上(在随后的运行中)。

          【讨论】:

            猜你喜欢
            • 2015-10-17
            • 2011-04-04
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多