I finally found out what the issue was.

I had to add /quiet to my sysprep command.

I also upgraded to packer 11

Because I did not have /quiet sysprep was opening a dialog box and due to 
that the sysprep process was not finishing properly. There were no errors 
logged but when I created VM's from the image I was getting a vague 
"Provisioning failed..." error.

I tested created VM's and VM Scalesets with the image I created and they 
both work.

I like packer but I did not find many good examples for creating Windows 
VM's on Azure. Most were Linux.

So I am going to find time and blog them here http://www.rajinders.com

Thanks for taking the time to help me.

%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /quiet

On Sunday, November 6, 2016 at 6:17:49 AM UTC-6, Alvaro Miranda Aguilera 
wrote:
>
>
> On Sat, Nov 5, 2016 at 10:00 PM, Rajinder Singh <[email protected] 
> <javascript:>> wrote:
>
>> %windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown
>>
>
> Hello.
>
>
> What It may be happening is the VM is not being created properly.
>
> If that command returns to the promp,. then packer will think the VM 
> failed since he cant connect and shutdown.
>
> What about if you replace the shutdown command with that:
> "%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown"
>
> I would replace %windir% with the actual folder name just to be sure.
>
> Hope this helps.
> Alvaro.
>
>
> -- 
> Alvaro
>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/a5af2884-5574-469a-8ae1-ec613f82ec7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to