Chef infra 尝试使用kitchen-ec2启动windows实例时,nil:nilclass的未定义用户名

Chef infra 尝试使用kitchen-ec2启动windows实例时,nil:nilclass的未定义用户名,chef-infra,aws-ec2,test-kitchen,Chef Infra,Aws Ec2,Test Kitchen,我试图使用kitchen-ec2为我的烹饪书启动windows-2012实例,当我尝试使用以下.kitchen.yml运行kitchen create时,我遇到了 未定义的方法“`username'表示nil:NilClass” 此刻我被困在这里,不知道如何前进。任何建议或建议都将极大地有助于进一步启动实例。感谢您抽出时间 .kitchen.yml --- driver: name: ec2 associate_public_ip: false aws_ssh_key_id: test-k

我试图使用kitchen-ec2为我的烹饪书启动windows-2012实例,当我尝试使用以下
.kitchen.yml
运行
kitchen create
时,我遇到了

未定义的方法“`username'表示nil:NilClass”

此刻我被困在这里,不知道如何前进。任何建议或建议都将极大地有助于进一步启动实例。感谢您抽出时间

.kitchen.yml

---
driver:
 name: ec2
 associate_public_ip: false
 aws_ssh_key_id: test-key
 instance_type: t2.medium
 region: us-east-1
 availability_zone: us-east-1c
 subnet_id: subnet-a
 security_group_ids:
  - "sg-a""
transport:
  ssh_key: test.pem
  associate_public_ip: false
  connection_timeout: 60
  connection_retries: 10
provisioner:
  name: chef_zero
  http_proxy: http://proxy.abc.com: 8081
  https_proxy: http://proxy.abc.com: 8081
  no_proxy: "169.254.169.254,amazonaws.com,abc.com"
  environments_path: environments
  roles_path: roles
  require_chef_omnibus: true
  client_rb:
    ssl_verify_mode: :verify_none
    verify_api_cert: false
platforms:
- name: windows-2012
  driver:
    image_id: ami-741c161e
    interface: private
    block_device_mappings:
      - device_name: /dev/sda1
        ebs:
          volume_size: 50
          delete_on_termination: true
          volume_type: gp2
          snapshot_id: snap-120uf
      tags:
        OwnerContact: test
        Name: windows-2012
      transport.username: Administrator
suites:
 - name: default
   run_list:
     - recipe[testing-kitchen]
   kitchen:
   attributes:

verifier:
http_proxy: http://proxy.abc.com:8081
https_proxy: http://proxy.abc.com:8081
no_proxy: "169.254.169.254,amazonaws.com,abc.com"
错误

>>>>>----> Creating <default-windows-2012>...
>>>>>D      Image for default-windows-2012: WIN12R2-x64-HVM-Enc-1603.  Architecture: x86_64, Virtualization: hvm, Storage: ebs gp2, Created: 2016-04-01T03:19:29.000Z
D      No platform detected for WIN12R2-x64-HVM-Enc-1603.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `username' for nil:NilClass]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
>>>-->正在创建。。。
>>>>>默认情况下的D图像-windows-2012:WIN12R2-x64-HVM-Enc-1603。体系结构:x86_64,虚拟化:hvm,存储:ebs gp2,创建时间:2016-04-01T03:19:29.000Z
D未检测到WIN12R2-x64-HVM-Enc-1603的平台。
>>>>>>----例外-------
>>>>>>类:Kitchen::ActionFailed
>>>>>>消息:未能完成#创建操作:[nil:NilClass的未定义方法'username]
>>>>>> ----------------------
>>>>>>有关更多详细信息,请参见.kitchen/logs/kitchen.log
>>>>>>还可以尝试运行'kitchen diagnose--all'进行配置

您可能也想将传输设置为
winrm


请参见示例。

能否检查
传输。用户名:Administrator
行?@StephenKing我已将用户名移动到传输下。现在该实例似乎已创建,但失败,并显示消息:未能完成#创建操作:[尝试60次后停止等待,但未成功)。不确定是否要修改“”的值连接超时:60次,连接重试次数:10次“那是另一个问题。很高兴这个问题得到了解决。感谢@StephenKing纠正我的错误。我已经用传输名称将我的kitchen.yml更新为winrm,但在启动实例后身份验证失败。
检索了实例的Windows密码。EC2实例就绪。[winrm]连接失败。3秒钟后重试:#
我似乎已更正,因为默认用户名
管理员
已被修改为其他用户,但现在似乎遇到了一些编码问题。
D,[2016-05-05T12:34:04.408219#49115]调试--厨房:消息:无法完成#创建操作:[用于nil:NilClass的未定义方法
encoding]`