0

I created a vagrant box out of windows 8.1 embedded OS that I have which includes winrm access. However when I try to create an instance using "Kitchen create", it's pulling the box and everything but kitchen's attempting to connect to Instance over ssh and and not winrm.(I configured transport option in kitchen.yml to winrm, still doesn't work)

* I created a box out of windows 8.1 embedded os and made configured winrm settings.

---
driver:
  name: vagrant

provisioner:
  name: chef_zero
  # You may wish to disable always updating cookbooks in CI or other testing environments.
  # For example:
  #   always_update_cookbooks: <%= !ENV['CI'] %>
  always_update_cookbooks: true

verifier:
  name: inspec

platforms:
  - name: testwin
    transport:
      name: winrm
      username: vagrant
      password: vagrant

suites:
  - name: default
    run_list:
      - recipe[winrm::default]
    verifier:
      inspec_tests:
        - test/integration/default
    attributes:
coderanger
  • 52,400
  • 4
  • 52
  • 75
Krishna
  • 13
  • 3
  • 1
    Edit your question to include the `kitchen.yml` contents so we can see what you have. – coderanger May 10 '18 at 02:59
  • I have uploaded the image of my Kitchen.yml file. – Krishna May 11 '18 at 15:25
  • I have created a vagrant box from my windows 8.1 embedded os and I have configured winrm. Does kitchen even support windows 8.1 embedded? – Krishna May 11 '18 at 15:26
  • Please add the _text_, not a screenshot. – coderanger May 11 '18 at 15:31
  • Done. Another question is I created the box and then I did "vagrant up" and then I did "kitchen create" from inside the cookbook. Is that how it's usually done, Do I have have to do " vagrant up" before "kitchen create" – Krishna May 11 '18 at 17:19

1 Answers1

1

Change your platform name to start with win. We use that activate some windows-specific behavior. Also you don't have any configuration about which Vagrant box to use, which you need to add.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Can you like write a sample kitchen.yml file here. Thanks! – Krishna May 11 '18 at 17:20
  • You mean, in the kitchen.yml. we need to specify the path to box?, coz I did not do that, I don't know how to do that – Krishna May 11 '18 at 17:22
  • And after kitchen create, It is trying to connect through ssh even though I explicitly mentioned transport as "winrm" – Krishna May 11 '18 at 17:54
  • That's coming from Vagrant itself and means the Windows box image was not created in Windows mode. Making Windows VBox images is very complex and probably out of scope for here. – coderanger May 11 '18 at 18:47
  • I am able to bootstrap windows 8.1 to my chefserver and provide a runlist though. I see that there are some templates for building windows boxes on bento gitthub repo. Have you ever tried them.? – Krishna May 11 '18 at 19:21
  • Again, building Windows images, even using the Bento tooling, is quite complex and out of scope to explain here in SO comments. I would recommend using existing Windows images through something like kitchen-ec2 instead. – coderanger May 11 '18 at 21:49