# Windows AWS Tutorial stuck on 'Waiting for WinRM to become available'

**URL:** <https://discuss.hashicorp.com/t/windows-aws-tutorial-stuck-on-waiting-for-winrm-to-become-available/25468>\
**Category:** Packer\
**Created:** [June 14, 2021, 10:01pm UTC](https://discuss.hashicorp.com/t/windows-aws-tutorial-stuck-on-waiting-for-winrm-to-become-available/25468 "2021-06-14T22:01:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danlamanna](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/danlamanna/32/20018_2.png) [@danlamanna](https://discuss.hashicorp.com/u/danlamanna)\
**Post date:** [June 14, 2021, 10:01pm UTC](https://discuss.hashicorp.com/t/windows-aws-tutorial-stuck-on-waiting-for-winrm-to-become-available/25468/1 "2021-06-14T22:01:27Z")

</div>

I’m running through the tutorial here [Build a Windows Image | Packer - HashiCorp Learn](https://learn.hashicorp.com/tutorials/packer/aws-windows-image?in=packer/integrations).

It continuously gets stuck on the step:

```auto
==> amazon-ebs.firstrun-windows: Waiting for WinRM to become available...

```

The debug logging shows it repeatedly looping on these steps:

```auto
2021/06/14 17:06:08 packer-plugin-amazon_v0.0.1_x5.0_linux_amd64 plugin: 2021/06/14 17:06:08 [INFO] Attempting WinRM connection...
2021/06/14 17:06:08 packer-plugin-amazon_v0.0.1_x5.0_linux_amd64 plugin: 2021/06/14 17:06:08 [DEBUG] connecting to remote shell using WinRM
2021/06/14 17:06:38 packer-plugin-amazon_v0.0.1_x5.0_linux_amd64 plugin: 2021/06/14 17:06:38 [ERROR] connection error: unknown error Post "http://ec2-18-217-112-193.compute-1.amazonaws.com:5985/wsman": dial tcp 18.217.112.193:5985: i/o timeout

```

I’ve tried various solutions referenced online (changing admin password, different base AMI, etc) and nothing seems to work.

I can RDP into the instance and see that the WinRM firewall rules look correct, and it appears to be running. However, probing the port remotely via `nc -zv $ip 5985` never returns.

Has anyone run through the tutorial verbatim recently? Is this just an issue on my end?

Edit: I’ve also just now realized the `<powershell>` tags are in the HTML and not in the code sample. Fixing that doesn’t change the behavior I’m seeing.

---

<div class="post-metadata">

**Author:** ![imran2191](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/imran2191/32/28732_2.png) [@imran2191](https://discuss.hashicorp.com/u/imran2191)\
**Post date:** [June 13, 2022, 7:43pm UTC](https://discuss.hashicorp.com/t/windows-aws-tutorial-stuck-on-waiting-for-winrm-to-become-available/25468/2 "2022-06-13T19:43:12Z")

</div>

I am also having the same issue, did you find any solution to the above mentioned error?

Note: the code that i have works with public subnet but its failing in Private subnet.

```auto

2022/06/13 12:44:46 packer-builder-amazon-ebs plugin: [ERROR] WinRM connection err: unknown error Post "<ip>/wsman": dial tcp : i/o timeout
2022/06/13 12:44:51 packer-builder-amazon-ebs plugin: Using host value: 
2022/06/13 12:44:51 packer-builder-amazon-ebs plugin: [INFO] Attempting WinRM connection...
2022/06/13 12:44:51 packer-builder-amazon-ebs plugin: [DEBUG] connecting to remote shell using WinRM

```
