Packer, Windows and AWS

55 views
Skip to first unread message

Chris Forbes

unread,
Nov 2, 2016, 1:11:02 PM11/2/16
to Packer
Hello everyone,

I've only been using Packer for a few weeks now for setting up our infrastructure in AWS. We are using it in conjunction with Terraform and it's going great... for Linux. I've started looking into creating the Windows machines that we unfortunately still need, and I'm having a lot of trouble. I've followed along with numerous different blog posts on how to actually get WinRM to work properly with no luck. I'm still stuck on the WinRM timeout issue.

Is there a definitive guide out there for creating a simple Windows AMI on AWS with Packer? Or does anyone have a Git repo that I can simply change the source AMI and run without any hitches?

Any help would be appreciated!

Chris

Alvaro Miranda Aguilera

unread,
Nov 2, 2016, 4:20:03 PM11/2/16
to packe...@googlegroups.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/afa18d28-a0bc-41d3-8c9f-9f1e6279121d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Rickard von Essen

unread,
Nov 2, 2016, 4:42:58 PM11/2/16
to packe...@googlegroups.com
Without knowing much about Windows, especially on AWS. But if I would try the same I would follow the following pattern.

Manually setup an EC2 with windows and enable WinRM. These things must go into a user-script. Verify that I can connect with WinRM from the host that will run Packer. Use a static security group allowing this. 

Code the settings that was manually verified into a Packer template. Run that with PACKER_LOG=1 and -on-error=ask to allow you to manually try to connect if Packer fails and see a lot of details of what Packer actually do. If you get stuck, post a template.json and additional scripts that you have tried here and ask for help.


--

Chris Forbes

unread,
Nov 3, 2016, 10:06:31 AM11/3/16
to Packer
Thank you both for the suggestions. "-on-error" was new to me. Alvaro's suggested script is essentially the same as what I've been working with. I started with Hashicorp's "best-practices" repo. And I have also read the post that you suggested, Rickard.

As I only need to build two windows machines at the moment, I think I'll just cave and do this manually for now. I'll come back and give it another go once I have all my other tasks finished.

Cheers


On Wednesday, 2 November 2016 20:42:58 UTC, Rickard von Essen wrote:
Without knowing much about Windows, especially on AWS. But if I would try the same I would follow the following pattern.

Manually setup an EC2 with windows and enable WinRM. These things must go into a user-script. Verify that I can connect with WinRM from the host that will run Packer. Use a static security group allowing this. 

Code the settings that was manually verified into a Packer template. Run that with PACKER_LOG=1 and -on-error=ask to allow you to manually try to connect if Packer fails and see a lot of details of what Packer actually do. If you get stuck, post a template.json and additional scripts that you have tried here and ask for help.

On 2 November 2016 at 18:11, Chris Forbes <kitf...@gmail.com> wrote:
Hello everyone,

I've only been using Packer for a few weeks now for setting up our infrastructure in AWS. We are using it in conjunction with Terraform and it's going great... for Linux. I've started looking into creating the Windows machines that we unfortunately still need, and I'm having a lot of trouble. I've followed along with numerous different blog posts on how to actually get WinRM to work properly with no luck. I'm still stuck on the WinRM timeout issue.

Is there a definitive guide out there for creating a simple Windows AMI on AWS with Packer? Or does anyone have a Git repo that I can simply change the source AMI and run without any hitches?

Any help would be appreciated!

Chris

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages