【发布时间】:2012-11-23 21:47:15
【问题描述】:
我是一个 Vagrant n00b,在使用 chef-solo 设置一个非常简单的 CentOS LAMP 盒子时,我在让 Vagrant 和 Chef 的 knife 命令一起玩时遇到问题。
以下是该问题的简要说明:
- 我在 vagrantbox.es 上使用 CentOS 6.3 w/ Chef 基本框创建了一个基本的 Vagrantfile。您可以在this gist 中查看基础知识。
- 我已经通过
knife cookbook site install nameofcookbook下载了所有食谱,并使用将它们放入./chef/cookbooks的配置。 - 我已经成功运行
vagrant upto 你可以在this gist看到基础。 - 我已经测试过apache、php等,都很好。
- 现在诀窍来了:在 VM 运行的情况下,我运行 Knife 添加另一个包(在本例中为 i3)。
- 从这里开始,Vagrant 无法在 VM 中执行各种任务:
-
当我运行
vagrant provision时,我收到这样的错误The chef binary (either `chef-solo` or `chef-client`) was not found on the VM and is required for chef provisioning. Please verify that chef is installed and that the binary is available on the PATH. 当我运行
vagrant halt时,我收到一个错误,即 ssh 命令以非零错误代码退出。- 但是,我可以运行
vagrant ssh,并确认 (a) chef-solo 实际上存在于框中,并且 (b) 我可以通过框中的命令行关闭。 - 当我运行
vagrant up时,我收到如下错误:The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! mkdir -p /vagrant</li>
我做错了什么?
非常感谢您的帮助,我对深入研究 Vagrant 感到非常兴奋!
【问题讨论】:
标签: centos chef-infra vagrant knife