【发布时间】:2015-10-15 12:48:37
【问题描述】:
由于我对厨师很陌生,我无法弄清楚以下错误:
$ kitchen create
-----> Starting Kitchen (v1.4.2)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::UserError
>>>>>> Message: Error parsing /home/ashishk/motd/.kitchen.yml as YAML.
Please run `kitchen diagnose --no-instances --loader' to help debug your issue.
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
我的 .kitchen.yml 文件如下所示:
$ cat .kitchen.yml
---
driver:
name: vagrant
provisioner:
# name: policyfile_zero
name: chef_zero
platforms:
- name: ubuntu-14.04
# - name: centos-7.1
driver:
customize:
memory: 256
suites:
- name: default
run_list:
- recipe[motd::default]
attributes:
我正在关注文档 [https://learn.chef.io/local-development/ubuntu/get-started-with-test-kitchen/][1]
请帮助我这里有什么问题!
安装的 Vagrant 现在出现以下错误:
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider virtualbox ----
STDOUT:
STDERR: The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
---- End output of vagrant up --no-provision --provider virtualbox ----
Ran vagrant up --no-provision --provider virtualbox returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
命令: ashishk@chef-workstation:~/motd$ VBoxManage --version
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-generic.
You will not be able to start VMs until this problem is fixed.
4.3.10_Ubuntur93012
附: 我已经在该 VM(ubuntu)中的 Windows 7 上安装了 Virtual box 我有厨师工作站在其上运行“厨房创建”
【问题讨论】:
-
注意缩进。从
driver下面开始,这被搞砸了。空格很重要。 -
好的,谢谢,但现在它给出了错误 $ kitchen list >>>>>> ------Exception------- >>>>>> Class: Kitchen: :UserError >>>>>> 消息:未安装 Vagrant 1.1.0 或更高版本。请从vagrantup.com/downloads.html 下载软件包。 >>>>>> ---------------------- >>>>>> 更多详情请查看 .kitchen/logs/kitchen.log >>> >>> 也尝试运行
kitchen diagnose --all进行配置 -
我使用 Ubuntu VM 作为工作站,所以 vagrant 应该安装在那个 VM 或 Base 机器上?
-
Vagrant 必须安装在那里,VirtualBox 可用。
-
已安装的 Vagrant 现在出现以下错误:VirtualBox 抱怨安装不完整。请运行
VBoxManage --version查看错误消息,其中应包含 >>>>>> ------Exception------- >>>>>> Class: Kitchen::ActionFailed >>>>> > 消息:未能完成 #create 操作:[预期进程以 [0] 退出,但收到 '1' ---- 开始输出 vagrant up --no-provision --provider virtualbox ---- STDOUT: STDERR : 被请求支持机器的提供者“virtualbox”
标签: ubuntu vagrant chef-infra virtualization test-kitchen