again do not take my word for granted as I am not a PS/Windows expert.. but I reckon you can do the troubleshooting to rule out this issue...
Probably another recomendation I'd suggest is to remove the windows-restart provisioner and verify if you packer provisioning moves forward with the next part of your JSON file On Monday, May 7, 2018 at 2:29:15 PM UTC+12, Gabo Kete wrote: > > I do not think this is a packers bug, well at least I can't tell based on > the information you have shared > > I reckon at the time packers uses the windows-restart provisioner, it > starts using the credentials you have setup for the VM using your script > and right after the windows-restart provisioner is where you start to have > problems > > > Have a look at this logs > > 2018/04/07 09:59:58 [INFO] (telemetry) Starting provisioner windows-restart > 2018/04/07 09:59:58 ui: ==> azure-arm: Restarting Machine > 2018/04/07 10:00:02 [INFO] 0 bytes written for 'stderr' > 2018/04/07 10:00:02 [INFO] 0 bytes written for 'stdout' > 2018/04/07 10:00:02 packer.exe: 2018/04/07 10:00:02 [INFO] 0 bytes written > for 'stdout' > 2018/04/07 10:00:02 packer.exe: 2018/04/07 10:00:02 [INFO] 0 bytes written > for 'stderr' > 2018/04/07 10:00:02 packer.exe: 2018/04/07 10:00:02 Retryable error: http > response error: 401 - invalid content type > > I'd suggest verifying your PS script and make sure your variables are > working as expected... I did try your script and the outcome I got was not > consistent... > > I would recommend to review this bit of your PS CODE and verify the > variables produce the right username and password > > Below is a capture of my screen showing a bit of your code where it shows > I am not getting the right password value > > > <https://lh3.googleusercontent.com/-kGGbrU11nUc/Wu-5rp94FII/AAAAAAAAQWQ/pFlRwljMMMIEM_1czTynWRJxJG7GIviXwCLcBGAs/s1600/Screen%2BShot%2B2018-05-05%2Bat%2B11.06.48%2BPM.png> > > > > > > On Monday, May 7, 2018 at 1:43:21 PM UTC+12, Sim wrote: >> >> Hi @Gabo, >> >> Thanks for your suggestion and sorry for the late reply. I think you >> might be right that after joining the domain, Packer failed to run >> "window-restart" command in the temporary VM. But there is no way log into >> that temporary VM to check as I don't know the admin credentials which >> Packer created for the temporary VM, and cannot also use my domain >> credentials to log in as the VM hasn't been configured for remote access. >> So what should I do now in terms of troubleshooting, surely feel like this >> is the packer bug but seems like no one could really figure out what is >> wrong with it as Packer is supposed to log back to the VM after domain join >> and run the rest of the template. Regarding the "*Add-WindowsFeature" *that >> you mentioned in the above post, I believe that wasn't the issue as Packer >> couldn't reach it if it couldn't pass the windows-restart step which it >> failed to do so. Do you know the master admin user that Packer created to >> generate the temporary VM in Azure? I hope you could help? Have been with >> this issue for a month and not many Packer maintainers could help me out :( >> >> Thanks, >> > -- 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/d7ea29ac-d098-47ea-bcbb-fd18a89d6ffb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
