I have done exactly what you have suggested, but I don't know why after successfully running the Domain Join script to join the network, it couldn't move on to the next step of the template (windows-restart or even executing the next script in the template). I think it may be because of the Domain join PowerShell command *(Add-Computer -DomainName $domain -Credential $credential)* has disconnected the VM to continue running the packer template. I have tried to look for a command or even a param to stop the VM to restart/ disconnect the VM from continuing the script, but couldn't find any. Is there any way to get over this issue? or is it a bug that packer couldn't continue the build after the tempVM has been domain joined or restarted? Thanks
On Friday, March 30, 2018 at 9:06:33 PM UTC+11, Alvaro Miranda Aguilera wrote: > > Hello > > There is no way to change the user that packer uses. > > > my suggestion was > > > connect with the normal user > run the join network > reboot > > then as the normal user, using runas run a 2nd script as the domain user > you require. > > 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/048bcf3e-f03a-4432-a44a-34960c646e6b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
