窗户 – 使用厨房汇聚.例外:VirtualBox要求使用相同的用户来管理创建的VM

前端之家收集整理的这篇文章主要介绍了窗户 – 使用厨房汇聚.例外:VirtualBox要求使用相同的用户来管理创建的VM前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用chef在我的本地机器上的VirtualBox上构建开发环境.
我的本地机器是 Windows 7.

首先,我想原谅自己,因为我对所有这些厨师和流浪汉环境都是全新的,只是我在遵循指示,现在遇到了一个我不理解的错误,在这种情况下不知道如何解决它.

我被告知要转到厨师文件夹结构中的vm文件夹并运行“bundle install”命令.在遇到一些问题后,我设法安装了所需的宝石.
现在我需要运行“kitchen converge”命令在oracle VM Box中构建虚拟机,但在执行期间的某个阶段,我得到了错误/ exeption.

Class: Kitchen::ActionFailed
Message: Failed to complete #create action: Expected process to exit with
0,but received '1'
Begin output of vagrant ssh-config
STDOUT:
STDERR: 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: 122765
Your UID is: 0
End output of vagrant ssh-config 
Ran vagrant ssh-config returned 1

Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration

我发现了这个问题:

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

所以我运行与管理员相同的命令,但它没有帮助.同样的问题.

具体来说,我不明白下面的命令

VirtualBox requires that the same user
be used to manage the VM that was created.

我猜厨师正在使用特定用户来构建流浪汉环境.

我想直接从命令行停止并启动Vagrant env’vagrant halt’但我得到了同样的错误.

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: 122765
Your UID is: 0

我将不胜感激任何帮助.
我想提一下这是公司机器,我无权更改UID等用户权限(即使我认为它只与Windows相关)

解决方法

对于所有接近同样问题的人来说,解决方案非常简单.
至少对我有用.

首先我运行命令

kitchen destroy

它会破坏你刚刚创建的虚拟盒子,但说实话我不认为它是相关的.

解:

I had to remove .Vagrant folder from my user home directory where for windows the folder is located in
C:\Users\(your user name)\.Vagrant

这将删除你的流浪者实例.

谢谢,祝你好运.

猜你在找的Windows相关文章