Windows客户端收敛的testing厨房失败WinRMAuthorizationError

我试图让客座Windows VM的testing厨房工作。 我跟着很多马特Wrock的优秀的博客文章。 我已经build立了一个可以工作的Windows Vagrant盒子 ,使用了正确的testing厨房和厨房 – stream浪者的分支 ,并设法让kitchen create工作。

在这一点上,我坚持让kitchen converge工作。 我会做一个融合,碰上:

 $ kitchen converge -----> Starting Kitchen (v1.3.2.dev) -----> Converging <default-windows-7>... Preparing files for transfer Preparing dna.json Resolving cookbook dependencies with Berkshelf 3.1.3... Removing non-cookbook files before transfer Preparing validation.pem Preparing client.rb >>>>>> ------Exception------- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: Failed to complete #converge action: [[Kitchen::Transport::Winrm] WinRM::WinRMAuthorizationError using shell: [powershell] and command: [ $ProgressPreference='SilentlyContinue'; if (-Not (Test-Path "/tmp/kitchen")) { mkdir "/tmp/kitchen" | Out-Null } if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' }; if (-Not (Test-Path "/tmp/kitchen")) { mkdir "/tmp/kitchen" | Out-Null } if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' }; if (-Not (Test-Path "/tmp/kitchen")) { mkdir "/tmp/kitchen" | Out-Null } if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' }; if (-Not (Test-Path "/tmp/kitchen")) { mkdir "/tmp/kitchen" | Out-Null } if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' }; if (-Not (Test-Path "/tmp/kitchen")) { mkdir "/tmp/kitchen" | Out-Null } if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' }; if (-Not (Test-Path "/tmp/kitchen")) { mkdir "/tmp/kitchen" | Out-Null } if ( Test-Path '/tmp/kitchen/data' ) { rm -r '/tmp/kitchen/data' };if ( Test-Path '/tmp/kitchen/data_bags' ) { rm -r '/tmp/kitchen/data_bags' };if ( Test-Path '/tmp/kitchen/environments' ) { rm -r '/tmp/kitchen/environments' };if ( Test-Path '/tmp/kitchen/roles' ) { rm -r '/tmp/kitchen/roles' };if ( Test-Path '/tmp/kitchen/clients' ) { rm -r '/tmp/kitchen/clients' };]] >>>>>> ---------------------- >>>>>> Please see .kitchen/logs/kitchen.log for more details >>>>>> Also try running `kitchen diagnose --all` for configuration 

在这一点上,我不知所措,我可以运行vagrant up并让shell供应商创build一个文件,所以powershell的权限似乎设置正确。 我有更多的细节与所有的configuration文件的要点 。

windows支持的分支最近已经被合并到最新版本中。 我的Gemfile(下面)指向testing厨房和厨房的testing主分支为我工作。 希望它也能为你工作。

PS:最后login多年使用它,这是我的第一个答复:-)

 source 'https://rubygems.org' group :development do gem "test-kitchen", :git => 'https://github.com/test-kitchen/test-kitchen.git', :branch => 'master' gem 'kitchen-vagrant', git: 'https://github.com/test-kitchen/kitchen-vagrant.git', :branch => 'master' gem "berkshelf" gem "vagrant-wrapper", ">= 2.0" end 

我遇到了完全相同的问题。 厨房创build工作正常,但收敛失败,错误。 我正在运行版本1.7.2的stream浪汉。 我降级到Vagrant 1.6.3,似乎解决了这个问题。