I have been using AWS EBS Windows AMI with packers for a long time.
I am trying to build a Azure Windows VM and running into issues.
If I don't sysprep the VM everything works well. I can use ARM template and provision windows VM from it.
However I need to provison VM scalesets. They require sysprepped image.
So I added a new provisoner at the end of building the image.
{
"type": "windows-shell",
"pause_before": "10s",
"scripts": [
"{{user `scripts_dir`}}/sysprep.bat"
]
}
It runs sysprep.bat file which looks like this.
%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown
Image was built successfully with no errors
However when I provision the VM scaleset the deployment never finishes. It just hangs.
If I replace my custom image with a stock windows server 2012 R2 image VMSS provisions
So I am looking for a simple example of building a sysprepped windows vm for Azure.
Many thanks for your help in advance.