[RESOLVED] Issues with Windows + kitchen-vagrant + vagrant 1.9.7


#1

New ChefDK 2.0.28 install - unable to run test-kitchen:

PS D:\git\chef\chef-repo> kitchen list -l debug
-----> Starting Kitchen (v1.16.0)
D [Vagrant command] BEGIN (vagrant --version)
D [Vagrant command] END (0m0.00s)

------Exception-------
Class: Kitchen::ShellOut::ShellCommandFailed
Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: stdin is not a tty
---- End output of vagrant --version ----
Ran vagrant --version returned 1


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

D ------Exception-------
D Class: Kitchen::ShellOut::ShellCommandFailed
D Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: stdin is not a tty
---- End output of vagrant --version ----
Ran vagrant --version returned 1
D ----------------------
D ------Backtrace-------
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/shell_out.rb:71:in rescue in run_command' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/shell_out.rb:59:inrun_command’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:434:in run_command' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:381:inrun’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:455:in run_silently' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:521:invagrant_version’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:182:in verify_dependencies' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/driver.rb:43:infor_plugin’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:233:in new_driver' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:246:innew_instance’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:142:in block in build_instances' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:inmap’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:in with_index' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:inbuild_instances’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:117:in instances' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:112:infiltered_instances’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:142:in parse_subcommand' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command/action.rb:35:inblock in call’
D C:/opscode/chefdk/embedded/lib/ruby/2.4.0/benchmark.rb:293:in measure' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command/action.rb:34:incall’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:53:in perform' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:187:inblock (2 levels) in class:CLI
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:334:in invoke_task' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor.rb:359:indispatch’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/bin/kitchen:13:inblock in <top (required)>'
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/errors.rb:171:in with_friendly_errors' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/bin/kitchen:13:in<top (required)>'
D C:/opscode/chefdk/bin/kitchen:275:in load' D C:/opscode/chefdk/bin/kitchen:275:in'
D ----End Backtrace-----
D —Nested Exception—
D Class: Mixlib::ShellOut::ShellCommandFailed
D Message: Expected process to exit with [0], but received ‘1’

PS D:\git\chef\chef-repo> chef -v
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1

PS D:\git\chef\chef-repo> bundle install
Using artifactory 2.8.2
Using bundler 1.15.3
Using ffi 1.9.18 (x86-mingw32)
Using wmi-lite 1.0.0
Using mixlib-versioning 1.2.2
Using thor 0.19.1
Using net-ssh 4.1.0
Using safe_yaml 1.0.4
Using win32-process 0.8.3
Using net-scp 1.2.1
Using net-ssh-gateway 1.3.0
Using mixlib-shellout 2.3.2 (universal-mingw32)
Using mixlib-install 2.1.12
Using test-kitchen 1.16.0
Using kitchen-vagrant 1.1.1


#2

I’m getting a similar error

i had got it working just a week ago.

For some reason, I had to redo these steps,

PS C:\Users\Vasu\learn-chef\cookbooks\learn_chef_apache2> kitchen list -l debug
D [Vagrant command] BEGIN (vagrant --version)
D [Vagrant command] END (0m0.00s)

------Exception-------
Class: Kitchen::ShellOut::ShellCommandFailed
Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: stdin is not a tty
---- End output of vagrant --version ----
Ran vagrant --version returned 1


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

D ------Exception-------
D Class: Kitchen::ShellOut::ShellCommandFailed
D Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: stdin is not a tty
---- End output of vagrant --version ----
Ran vagrant --version returned 1
D ----------------------
D ------Backtrace-------
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/shell_out.rb:71:in rescue in run_command' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/shell_out.rb:59:inrun_command’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:434:in run_command' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:381:inrun’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:455:in run_silently' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:521:invagrant_version’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:182:in verify_dependencies' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/driver.rb:43:infor_plugin’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:233:in new_driver' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:246:innew_instance’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:142:in block in build_instances' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:inmap’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:in with_index' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:inbuild_instances’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:117:in instances' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:112:infiltered_instances’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:142:in parse_subcommand' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command/list.rb:30:incall’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:53:in perform' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:121:inlist’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:334:in invoke_task' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor.rb:359:indispatch’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/bin/kitchen:13:inblock in <top (required)>'
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/errors.rb:171:in with_friendly_errors' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/bin/kitchen:13:in<top (required)>'
D C:/opscode/chefdk/bin/kitchen:275:in load' D C:/opscode/chefdk/bin/kitchen:275:in'
D ----End Backtrace-----
D —Nested Exception—
D Class: Mixlib::ShellOut::ShellCommandFailed
D Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: stdin is not a tty
---- End output of vagrant --version ----
Ran vagrant --version returned 1
D ----------------------
D ------Backtrace-------
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/shell_out.rb:71:in rescue in run_command' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/shell_out.rb:59:inrun_command’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:434:in run_command' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:381:inrun’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:455:in run_silently' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:521:invagrant_version’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vagrant-1.1.0/lib/kitchen/driver/vagrant.rb:182:in verify_dependencies' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/driver.rb:43:infor_plugin’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:233:in new_driver' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:246:innew_instance’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:142:in block in build_instances' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:inmap’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:in with_index' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:141:inbuild_instances’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/config.rb:117:in instances' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:112:infiltered_instances’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command.rb:142:in parse_subcommand' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/command/list.rb:30:incall’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:53:in perform' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:121:inlist’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/cli.rb:334:in invoke_task' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor.rb:359:indispatch’
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/bin/kitchen:13:inblock in <top (required)>'
D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/lib/kitchen/errors.rb:171:in with_friendly_errors' D C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/test-kitchen-1.16.0/bin/kitchen:13:in<top (required)>'
D C:/opscode/chefdk/bin/kitchen:275:in load' D C:/opscode/chefdk/bin/kitchen:275:in'
D ----End Backtrace-----


#3

Are you still getting this same error? Response said “I had to redo these steps” but no steps given?


#4

Sorry, my bad, I meant to say, for some other reason, I had to reinstall Chef DK and kitchen list … stopped working
I ran “Chef verify” and it said everything is find …

Strange

PS C:\Users\Vasu\learn-chef\cookbooks\learn_chef_apache2> chef verify
[WARN] This is an internal command used by the ChefDK development team. If you are a ChefDK user, please do not run it. C:\Users\Vasu\learn-chef\cookbooks\learn_chef_apache2>
Running verification for component 'berkshelf’
Running verification for component 'test-kitchen’
Running verification for component 'tk-policyfile-provisioner’
Running verification for component 'chef-client’
Running verification for component 'chef-dk’
Running verification for component 'chef-provisioning’
Running verification for component 'chefspec’
Running verification for component 'generated-cookbooks-pass-chefspec’
Running verification for component 'fauxhai’
Running verification for component 'knife-spork’
Running verification for component 'kitchen-vagrant’
Running verification for component 'package installation’
Running verification for component 'openssl’
Running verification for component 'inspec’
Running verification for component 'delivery-cli’
Running verification for component 'git’
Running verification for component 'opscode-pushy-client’
Running verification for component ‘chef-sugar’
…C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-provisioning-aws-2.2.2/lib/chef/resource/aws_route53_record_set.rb:48: warning: constant ::Fixnum is deprecated

Verification of component ‘package installation’ succeeded.
Verification of component ‘openssl’ succeeded.
Verification of component ‘chefspec’ succeeded.
Verification of component ‘inspec’ succeeded.
Verification of component ‘tk-policyfile-provisioner’ succeeded.
Verification of component ‘chef-dk’ succeeded.
Verification of component ‘fauxhai’ succeeded.
Verification of component ‘kitchen-vagrant’ succeeded.
Verification of component ‘opscode-pushy-client’ succeeded.
Verification of component ‘berkshelf’ succeeded.
Verification of component ‘knife-spork’ succeeded.
Verification of component ‘test-kitchen’ succeeded.
Verification of component ‘delivery-cli’ succeeded.
Verification of component ‘chef-client’ succeeded.
Verification of component ‘git’ succeeded.
Verification of component ‘chef-provisioning’ succeeded.
Verification of component ‘chef-sugar’ succeeded.
Verification of component ‘generated-cookbooks-pass-chefspec’ succeeded.
PS C:\Users\Vasu\learn-chef\cookbooks\learn_chef_apache


#5

Uninstalled ChefDK 2.0.28 and installed v1.5.0 —> same error
Uninstalled Vagrant 1.9.6 and installed v1.8.5 —> problem fixed!!
Have not tried Vagrant versions between 1.8.5 and 1.9.6, but this would appear to be a problem with Vagrant 1.9.6 and test-kitchen on Windows (I tried both Win 7 and Win 10 with same error) - clean install on VMware VM and Desktop. Vagrant/Virtualbox alone works fine, i.e.“vagrant up” starts vm with no problems.


#6

Same error in ChefDK 2.0.28, Vagrant 1.9.7 and test kitchen 1.16.0 on Windows 10.
Submitted issue in kitchen-vagrant repo https://github.com/test-kitchen/kitchen-vagrant/issues/320

Here is my debug output of kitchen list https://gist.github.com/joelhandwell/f5c324ee73f0ccf0d0474a0ea27764e0


#7

Thanks.

Rolling back my Vagrant version to 1.8.5 made it work!!!

Some one need this to report it


#8

I’m running Windows 10 ,
PS C:\Users\Vasu\learn-chef\cookbooks\lamp> chef --version
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1


#9

The initial error is already a known bug with Vagrant 1.9.7 and 1.9.6 should not display the issue. Though it’s not really a kitchen-vagrant bug we are looking at attempting to handle that particular exception to at least indicate that Vagrant is the issue.

Cheers,
cheeseplus