刀窗肯定安装但引导程序仍然失败

时间:2015-06-04 17:10:34

标签: chef knife

我肯定安装了刀窗。厨师宝石列表显示了刀窗,但是当我运行bootstrap时,我被告知它没有安装。

sudo -u user -H sh -c "cd /home/user/chef-repo/; chef gem list"
sudo -u user -H sh -c "cd /home/user/chef-repo/; knife bootstrap windows winrm $VMIP  -r 'role[build_server]' -x 'domain\user' -V -P 'password'"

输出

第一个命令显示:刀窗(0.8.5,0.8.3)

第二

INFO: Using configuration from /home/user/.chef/knife.rb
WARNING: Hostname containing 'windows' specified. Please install 'knife-windows' if you are attempting to bootstrap a Windows node via WinRM.
Doing old-style registration with the validation key at /home/user/.chef/myserver-validator.pem...
Delete your validation key in order to use your user credentials instead

有什么明显的东西我不见了吗?

干杯

1 个答案:

答案 0 :(得分:1)

看起来您的ChefDK设置不完整,因为您的sudo命令调用/usr/bin/knife,它看起来像基于rubygems的knife,而不是ChefDK。

请确保将ChefDK添加到用户的$ PATH,如下所述: https://docs.chef.io/install_dk.html#add-ruby-to-path

根据您的设置,您还希望使用sudo -i在登录shell中执行命令。