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

Windows create fails fetching password #211

Closed
jsmickey opened this issue Jan 6, 2016 · 4 comments
Closed

Windows create fails fetching password #211

jsmickey opened this issue Jan 6, 2016 · 4 comments

Comments

@jsmickey
Copy link

jsmickey commented Jan 6, 2016

I am having trouble retrieving passwords for Windows instances. I am starting with a simple setup very similar to https://learn.chef.io/local-development/windows/apply-the-web-application-cookbook-locally/

Please note, the workstation is Ubuntu and I am building and testing EC2 instances for Ubuntu and RHEL with no issues. I am able to telnet to the instance via the winRM ports from my workstation. I have checked the instances and see the Powershell user data scripts did run properly.

Here is my .kitchen.yml


---
driver:
  name: ec2
  aws_ssh_key_id: my_key
  security_group_ids: ["sg-xxxxxx"]
  region: us-west-2
  availability_zone: us-west-2b
  subnet_id: subnet-xxxxxxxxxxxx
  iam_profile_name: my_profile
  instance_type: t2.medium
  associate_pulbic_ip: false
  interface: private
  retryable_tries: 120

transport:
  username: Administrator
  connection_retries: 60
  connection_retry_sleep: 5

platforms:
  - name: windows-2012r2
    driver:
      image_id: ami-91a7bef0

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

And here is the error

2016/01/06 21:18:11Z: AMI-ID: ami-91a7bef0
2016/01/06 21:18:11Z: Instance-ID: i-c041ac07
2016/01/06 21:18:13Z: Driver: AWS PV Network Device v7.3.2.0
2016/01/06 21:18:13Z: Driver: AWS PV Storage Host Adapter v7.3.2.0
2016/01/06 21:18:13Z: Ec2SetPassword: Enabled
2016/01/06 21:18:15Z: RDPCERTIFICATE-SUBJECTNAME: WIN-M5RBN59CS2C
2016/01/06 21:18:15Z: RDPCERTIFICATE-THUMBPRINT: 2999277D5D9AE4F083D260A0D9676F158EF42543
2016/01/06 21:18:18Z: Username: Administrator
2016/01/06 21:18:18Z: Password: <Password>
bbMMcxK/2iGPIN/9+ArEZNDDEybs+eMb7X170FIlg6e1KmEvYGQTc/bPC8TNlTVUoj/a3Jue/+u618Mb45J4H0GDRFePVBTy0W1gPmMaz4nvSLIbYlxkJgFOicwavpeK7kBHYSPUXLzRQlRkguDkTD3jgNOaP092Az9wV7dMMoi63LcVMJDis9iWa70sdrtXM2TJ4CpLFMPL6NWAXuI6Qd0BXVkQ+56zoX2asAoIKAujzEoCnIz+wOXfdmio8ILntqaPvJNsis7r/WRIKLgt9QH3YgISMBy6DwmXA6d3St10/HMC6fQ+gI3A2vqp96qY5YC7AFxwCeTvDSS8Yrh8+w==
</Password>
2016/01/06 21:18:22Z: Message: Windows is Ready to use

       Waited 0/600s for instance <i-c041ac07> to fetch windows admin password.
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [no implicit conversion of nil into String]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

I have run kitchen diagnose, tried different AMIs, and tried different transport options with no success. Any help is appreciated

@rhass-r7
Copy link

rhass-r7 commented Jan 6, 2016

This is likely a duplicate of issue #201

@jsmickey
Copy link
Author

jsmickey commented Jan 7, 2016

Thanks @rhass-r7

@jsmickey jsmickey changed the title Windows - Windows create fails fetching password Jan 8, 2016
@jsmickey
Copy link
Author

jsmickey commented Jan 8, 2016

Figured out a workaround

1 kitchen create windows
2 This will fail when trying to fetch the password
3 Edit .kitchen/windows.yml - Add the username, password, and status lines

---
server_id: i-28c22aef
hostname: 172.16.3.49
username: Administrator
password: xxxxxxxxxxx
status: created

4 kitchen create windows
5 kitchen converge windows

@cheeseplus
Copy link
Contributor

Closing as dupe

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

3 participants