Waiting for WinRM to become available

62 views
Skip to first unread message

Kishore Ponniah

unread,
Jun 18, 2019, 10:08:11 AM6/18/19
to Packer
Hi all,

I am trying to build an AMI for bamboo elastic agents using packer. But it is stuck in "Waiting for WinRM to become available". I am using user data scripts and that works perfectly ok with other images. 

Kindly assist what is missing in my scripts.

Thanks
Kishore
win2016-dotnet.json
win2016.txt

Jason Voorhees

unread,
Jun 18, 2019, 3:31:10 PM6/18/19
to packe...@googlegroups.com
Hello:

> I am trying to build an AMI for bamboo elastic agents using packer. But it is stuck in "Waiting for WinRM to become available". I am using user data scripts and that works perfectly ok with other images.
>
> Kindly assist what is missing in my scripts.
>
Could you please share your packer json file?

Jordan Borean

unread,
Jun 19, 2019, 1:35:38 AM6/19/19
to Packer
When you say it works perfectly with other images can you share some more info. I see you are manually adding the WSMan listener but one step you are missing is to set the LocalAccountTokenFilterPolicy [1] setting. This must be set to not filter the token on network logons for WinRM to work as only Administrators can connect to a WinRM endpoint by default. It would be great if you could share the debug logs of a Packer run as that usually logs WinRM attemps and if it even attempted to connect.

Some other brief notes when looking at your user data;

  • You are setting AllowUnencrypted = $true even though you are running over HTTPS, this is not needed and really shouldn't be set unless you want to run over HTTP
  • You are setting TrustedHosts on the Client side, this isn't needed for Packer unless that's what you want done as part of your image build


Thanks

Jordan

Kishore Ponniah

unread,
Jun 19, 2019, 4:44:25 AM6/19/19
to Packer
Hi Jordan,

Thanks for coming back to me on this, I have attached other image script which uses the same user data. When you said adding the WSMan listener, is that on line 8 or line 29 of my user data script which I attached previously?

Kishore
win2016-elasticbeanstalk.json

Kishore Ponniah

unread,
Jun 19, 2019, 4:45:33 AM6/19/19
to Packer
Hi Jason, 

The packer json file is the one I attached yesterday (win2016-dotnet.json)

Regards
Kishore

Kishore Ponniah

unread,
Jun 19, 2019, 8:49:34 AM6/19/19
to Packer
Hi,

It is working now and that's because I changed the VPC, Subnet and Security Group which had the required ports open to create an AMI. Earlier it was set to default VPC.

Thanks
Kishore
Reply all
Reply to author
Forward
0 new messages