Packer v1.2.1 - WinRM communicator timeout

69 views
Skip to first unread message

Dave Nelson

unread,
Apr 6, 2018, 8:44:11 AM4/6/18
to Packer
Hey all,

Am using the WinRM communicator with Packer 1.2.1 using the vmware-iso builder.

I get the WinRM timeout unless I specify the IP address of the target VM using "winrm_host".  My packer exe is on a different subnet to the target VM but there is routing in place, as demonstrated that it works with the winrm_host setting.

When i run a 'netstat -ano | findstr "5985"' on my test machine (where Packer is running) I can see that there is no attempt by the test machine to 'talk' to the target VM.  However, if I specify the winrm_host setting, I see the test PC trying to connect on 5985 to the target VM's IP.

I hope I am doing something glaringly wrong and you can tell me to stop being daft.  I have checked a fair few docks, example JSON files, etc, and can't get a working solution.  Any help would be gratefully received.

Cheers,

Dave.


Megan Marsh

unread,
Apr 6, 2018, 12:17:27 PM4/6/18
to packe...@googlegroups.com
Sorry to hear you're having trouble :( . Can you share the relevant parts of your Packer config? It'll make it a lot easier to troubleshoot.

Dave Nelson

unread,
Apr 9, 2018, 4:00:30 AM4/9/18
to Packer
Hi Megan,

No worries at all.  Thanks for getting back to me :o)

The test JSON file and WinRM config files are here:


If you need anything else, let me know.

Cheers,

Dave.

Dave Nelson

unread,
Apr 12, 2018, 10:26:10 AM4/12/18
to Packer
Hi Megan,

Just to let you know that I have tried with Packer version 1.2.2 and still get the same issue.

Cheers,

Dave.

Megan Marsh

unread,
Apr 12, 2018, 12:25:39 PM4/12/18
to packe...@googlegroups.com
One thing jumps immediately to mind. You're using quickconfig, which some users have found causes a race condition with Packer. Normally I find this issue to be only sporadic, but it's something to try. We have an example in our docs of a winrm config script that doesn't use quickconfig. 

https://www.packer.io/intro/getting-started/build-image.html#a-windows-example

If that doesn't do it, I'd like you to open an issue on the Packer github for me, if you don't mind.

Thanks!

j.r.haw...@googlemail.com

unread,
Apr 13, 2018, 11:54:38 AM4/13/18
to Packer
Thanks for this, I hit the same thing with a template which had previously worked.
I got rid of quickconfig and used the code from the windows example and template works again.

If you get stuck at this point if you can connect to the temp vm and poke around you may well find like I did that winrm wasn't running and firewall wouldn't allow winrm.

Jon
Reply all
Reply to author
Forward
Message has been deleted
0 new messages