Unfortunately, user_data_file is basically the only way to get that initial configuration set up. I wonder if before the sysprep you could overwrite that file so the values in it are different.
On Tue, May 19, 2020 at 12:31 PM Eric Richardson <[email protected]> wrote: > Hi Megan - > > Thanks for the response, that's what I was worried about. > > Reading the Packer docs, it sounded like the user data provided to the > packer "user_data_file" attribute shouldn't persist, but it seems like that > goes out the window when Windows and Sysprep are thrown into the mix. > > I looked at clearing the user data as part of my provisioning using AWS > for Powershell command Edit-EC2InstanceAttribute, but it appears that only > works on a stopped instance. > > So unfortunately, it sounds like if you use "user_data_file" for initial > WinRM configuration in Packer, you're out of luck if you want to use user > data for child instances created from the custom AMI. > > Don't want to increase the scope of the question too much, but is there a > better way to initiate WinRM connection than using "user_data_file"? As I > mentioned, that seemed to be the only way I could get WinRM up and running > and was recommended in most of the docs I found. > > On Tue, May 19, 2020 at 12:57 PM Megan Marsh <[email protected]> > wrote: > >> My windows VM is in vmware also, but I run it directly on my OSX machine >> so I only have to deal with one layer of virtualization and don't have >> specific advice for that. That said, I like the >> https://github.com/StefanScherer/packer-windows packer templates a lot >> for building windows images and they have vmware-iso builders. >> >> If you don't need to package the image into a Vagrant box though, you'll >> want to remove Vagrant the post-processors. >> >> -- >> 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/hashicorp/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/CAGPV1uqjP8ivipcVKaLKz1OWPvBsAfK7MzQZVgL5ptf%2BDgzGow%40mail.gmail.com >> <https://groups.google.com/d/msgid/packer-tool/CAGPV1uqjP8ivipcVKaLKz1OWPvBsAfK7MzQZVgL5ptf%2BDgzGow%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > ++Eric > > -- > 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/hashicorp/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/CAPE%2BqMZY_jVgOtLDeU71tcVuQDqKAhca0HpnDAx6TwoV%2B007dQ%40mail.gmail.com > <https://groups.google.com/d/msgid/packer-tool/CAPE%2BqMZY_jVgOtLDeU71tcVuQDqKAhca0HpnDAx6TwoV%2B007dQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/hashicorp/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/CAGPV1urXEjGMt%2B5wcMxCkr-V%3DEBQfho_%3Drn%3Dq_4OQg-U2JdqVQ%40mail.gmail.com.
