Hello,
I'm trying to use the "A Windows Example" on the Packer build-image tutorial.
The ONLY thing I've changed to get it partially working, is setting "vpc_id" and "subnet_id" in the builders section because we do not have a default VPC. I also have tried this with Win 2012 base and Win 2016 base.
The machine spins up, but freezes at
==> amazon-ebs: Waiting for WinRM to become available...
I enabled RDP in the temporary packer security group and can connect to the machine. I verified that the bootstrap_win is at least partially running by putting in a powershell command to create a file on the new machine and it did so. I ran Test-WSMan on the machine and I don't get any errors.
I enabled debug, and the log is just filled with:
2019/06/20 16:13:02 packer.exe: 2019/06/20 16:13:02 [INFO] Attempting WinRM connection...
2019/06/20 16:13:02 packer.exe: 2019/06/20 16:13:02 [DEBUG] connecting to remote shell using WinRM
2019/06/20 16:13:02 packer.exe: 2019/06/20 16:13:02 [ERROR] connection error: unknown error Post http://ip-10-0-0-37.ec2.internal:5985/wsman: dial tcp: lookup ip-10-0-0-37.ec2.internal: no such host
Is the problem that it is trying to use the internal IP vs. external? Is there a way to force external? The newly created machine is not on any domain. I also tried manually creating a different machine on the same VPC, installed Packer, and went through these same steps with the same result.
I've seen others with the same or similar behavior, but the cause/solution seems different.
Any ideas?
Thanks,
Jon