Test Kitchen não detectando winrm e usa SSH para janelas guest

1

Eu sou novo para testar a cozinha com janelas

Estou testando receitas de chef em uma máquina com Windows usando o Test Kitchen com o Vagrant (virtualbox)

Eu tenho win-2012-r2 box que funciona bem com o Vagrant (ambos os trabalhos winrm e rdp)

Mas, ao usar o mesmo com a cozinha, ele tenta conectar o SSH em vez de winrm

Aqui está o meu arquivo .kitchen.yml

---
driver:
  name: vagrant

provisioner:
  name: chef_zero

verifier:
  name: inspec

transport:
  name: winrm
  elevated: true

platforms:
  - name: win-2012-r2
    driver:
      box: win-2012-r2
      communicator: 'winrm'
      winrm_username: 'admin'
      winrm_password: 'adminadmin'

suites:
  - name: default
    run_list:
      - recipe[ttest::default]

Ao executar kitchen test , a saída é

-----> Starting Kitchen (v1.11.1)
-----> Cleaning up any prior instances of <default-win-2012-r2>
-----> Destroying <default-win-2012-r2>...
       Finished destroying <default-win-2012-r2> (0m0.00s).
-----> Testing <default-win-2012-r2>
-----> Creating <default-win-2012-r2>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'win-2012-r2'...
==> default: Matching MAC address for NAT networking...
       ==> default: Setting the name of the VM: kitchen-ttest-default-win-2012-r2_default_1472129655910_94157
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 22 (guest) => 2222 (host) (adapter 1)
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
           default: SSH address: 127.0.0.1:2222
           default: SSH username: vagrant
           default: SSH auth method: private key
......................
STDERR: Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

Não tenho certeza de onde estou perdendo.

Test Kitchen version 1.11.1
Vagrant 1.8.5
VirtualBox 5.1

Obrigado a todos

    
por Shan 25.08.2016 / 15:21

1 resposta

2

Tente definir o port para 5985 (ou qualquer porta que você precisar.
Por exemplo:

platforms: - name: windows2016 transport: name: winrm elevated: true port: 5985

Se isso não funcionar, tente kitchen converge -l debug e obtenha mais informações sobre o tempo limite da máquina.

    
por 16.10.2017 / 10:39