Packer Azure ARM, Stuck on Waiting for WinRM to become available Windows 2012 R2 Imgae

293 views
Skip to first unread message

peter...@aegon.co.uk

unread,
Apr 12, 2017, 7:32:39 AM4/12/17
to Packer
Hi,

I am quite a newbie to Packer, but learnt a lot last few days and got packer sorted for AWS 2012 R2 build, but having issue with Azure.

with Jenkins / Packer it creates the VM and then gets stuck at Waiting for WinRM to become available, before doing provisioning and then times outs, VM on internal hybrid VPC.

I have put Packer into debug mode -debug on the Jenkins job and can RDP into server when created and even set NIC to private and disable private firewall and configured WinRM and created self cert for SSL, but still failes waiting on WINRM.
I tested successfully winRM to new VM from my machine and worked correctly when skip  CA check.

I know with Azure 2012 R2 imgae, the Network automatically goes to Public profile until you change it to private and no firewall rules for winRM, so we can't provision anything to fix WinRM.

we are after an automated way to fix Azure 2012 Image with Packer to configure WinRM and enable Firewall rules even if NIC on public profile.

Then we can install apps and do sysprep, so can then deploy VM from new VHD.

Is there away of doing this with Jenkins / Packer and fully automate it?

I know with AWs there is Users_content that has scripts run before packer starts bulding and I know azure has custom scripts but again need winRM working before can use that and VM can't access Internet.

any ideas or help would be much appreciated.

Many Thanks
Reply all
Reply to author
Forward
0 new messages