Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kitchen create error(s) - hyper-v win server 2016 guest #418

Open
bp-rocket opened this issue Jul 9, 2020 · 2 comments
Open

kitchen create error(s) - hyper-v win server 2016 guest #418

bp-rocket opened this issue Jul 9, 2020 · 2 comments

Comments

@bp-rocket
Copy link

bp-rocket commented Jul 9, 2020

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

The follow errors are returned when running "kitchen create"...

-----> Starting Test Kitchen (v2.5.1)
-----> Creating <default-Windows-2016>...
       WARNING: Vagrant has detected the `vagrant-winrm` plugin. Vagrant ships with
       WinRM support builtin and no longer requires the `vagrant-winrm` plugin. To
       prevent unexpected errors please uninstall the `vagrant-winrm` plugin using
       the command shown below:

         vagrant plugin uninstall vagrant-winrm

       To disable this warning, set the environment variable `VAGRANT_IGNORE_WINRM_PLUGIN`
       Bringing machine 'default' up with 'hyperv' provider...
       ==> default: Verifying Hyper-V is enabled...
       ==> default: Verifying Hyper-V is accessible...
       ==> default: Machine not provisioned because `--no-provision` is specified.
$$$$$$ (10,8):UserId:
At line:1 char:1
$$$$$$ + $username = 'vagrant'
$$$$$$ + ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Write-Error], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [WinRM exited (-2147024809) for command: [Write-Host '[WinRM] Established
']] on default-Windows-2016
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Version

Vagrant 2.2.9
Chef Workstation version: 20.6.62
Chef Infra Client version: 16.1.16
Chef InSpec version: 4.19.0
Chef CLI version: 3.0.4
Test Kitchen version: 2.5.1
Cookstyle version: 6.7.3

Environment

Host OS: Windows 10 Enterprise
.kitchen.yml contents...

---
driver:
  name: vagrant
  boot_timeout: 1200
  gui: false

provisioner:
  name: chef_zero
  product_name: chef
  product_version: 14.12.9

verifier:
  name: inspec

transport:
  name: winrm
  elevated: true
  username: Administrator
  password: Pass@word1

platforms:
  - name: Windows-2016
    driver:
      box: StefanScherer/windows_2016
      provider: hyperv

suites:
  - name: default
    run_list:
      - recipe[learn_chef_iis::default]
    verifier:
      inspec_tests:
        - test/smoke/default
    attributes:

Vagrant file contents...

Vagrant.configure("2") do |config|

  config.vm.box = "StefanScherer/windows_2016"
  config.vm.box_version = "> 2019.01.09"
  config.vm.define "hyperv-learn-chef-iis-win2016" do |h|
  end

  config.vm.provider "hyperv" do |h|
	h.cpus = "2"
	h.memory = "4196"
	h.name = "learn-chef-iis-win2016"
  end
end

Scenario

I'm new to the chef/test kitchen/vagrant tools. I'm trying to setup an development environment for building Chef recipes and cookbooks.

Steps to Reproduce

I'm hoping the contents of the .kitchen.yml and vagrantfile will provide enough information.

Expected Result

No errors

Actual Result

Lots of errors that I don't know how to resolve.
default-windows-2016.log
kitchen.log

➕ Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

@bp-rocket bp-rocket reopened this Sep 10, 2020
@bp-rocket
Copy link
Author

I'm still having this issue. Can someone assist?

Here are the execution log kitchen.yml files.
files.zip

@marcparadise
Copy link

@bp-rocket since we don't include the vagrant-winrm plugin in Chef Workstation, I wonder if the one you have installed locally is conflicting with the built-in behaviors of Vagrant for WinRM. Could you try uninstalling that plugin via vagrant plugin uninstall vagrant-winrm and let us know here if that resolves the issue or changes any behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants