我尝试使用kitchen-ec2
和test-kitchen
启动Windows-2012实例。我使用下面的kitchen.yml
文件来启动实例。我观察要创建的实例,但最终会导致此错误。任何人都可以指导我的kitchen.yml有什么问题,或者它可能与我的实例连接有关。谢谢
错误
D ------ Exception ------- D Class:Kitchen :: ActionFailed D
消息:无法完成#create操作:[未初始化的常量 WinRM :: HTTP :: HttpNegotiate :: WinRMWebServiceError] D ---嵌套 异常--- D类:NameError D消息:未初始化 常量WinRM :: HTTP :: HttpNegotiate :: WinRMWebServiceError D
------ Backtrace ------- D /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/winrm-1.7.2/lib/winrm/http/transport.rb: 213:在winrm_decrypt' D
send_request' d
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/winrm-1.7.2/lib/winrm/http/transport.rb:196:in
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/winrm-1.7.2/lib/winrm/winrm_service.rb:489:in `send_message'
kitchen.yml
driver:
name: ec2
associate_public_ip: false
shared_credentials_profile: test_user
aws_ssh_key_id: windows_test
instance_type: t2.medium
region: us-east-1
availability_zone: us-east-1c
subnet_id: subnet-a8989 security_group_ids:
- "sg-3433"
- "sg-abcdef"
retryable_tries: 200
retryable_sleep: 8
transport:
name: winrm
ssh_key: windowstest.pem
associate_public_ip: false
connection_timeout: 200
connection_retries: 10
username: Administrator
platforms:
- name: windows-2012
driver:
image_id: ami-09udlj
interface: private
block_device_mappings:
- device_name: /dev/sda1
ebs:
volume_size: 50
delete_on_termination: true
volume_type: gp2
snapshot_id: snap-dlk0uere
- device_name: /dev/xvdg
ebs:
volume_size: 30
delete_on_termination: true
volume_type: gp2
snapshot_id: snap-0dfudf
tags:
Name: windows-2012