I am trying to build a fully baked image in Azure inclusive of software that requires the machine to be a domain member as a golden image source for Citrix. I am able to use a similar process and set of PowerShell scripts to provision against our VMWare clusters.
I have spent several days in Google with not too much success.
The build works up until I envoke the windows-restart provisioner following the execution of the domain join via the PowerShell script. I am receiving a 401 error in the Packer log. I have tried various things to reconfigure WinRM within the VM prior to the restart but nothing as worked.
Is Packer capable of creating a domain join VM image using Azure-ARM that includes executing scripts after the domain join and required reboot? If so, is there an example that could be referred to?