Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure ARM install Windows Updates #281

Open
hc-github-team-packer opened this issue Mar 15, 2023 · 2 comments
Open

Azure ARM install Windows Updates #281

hc-github-team-packer opened this issue Mar 15, 2023 · 2 comments

Comments

@hc-github-team-packer
Copy link

This issue was originally opened by @blitzeisschoenaufpassen in hashicorp/packer#12307 and has been migrated to this repository. The original issue description is below.


Is there a possibility to install Windows Updates in an Azure ARM template like it is described here for VMWare templates:

Generally speaking, people deal with the windows update nondeterminism by providing their windows update script as a floppy file, so that it runs before the communicator connects and before provisioners run. By installing SSH or enabling winRM after your windows update script runs, you guarantee that you aren't going to accidentally start provisioners before you're ready. Here's an example:

https://github.com/joefitzgerald/packer-windows/blob/master/windows_10.json#L23-L24

I can see why you'd want this feature but the Packer template isn't meant to be a programming language. I think that adding a loop feature to the provisioners makes some pretty dramatic changes to user expectations for what a Packer provisioner should be, and in your particular case I think it's overkill. I'll think about it some more but for now I'm going to close this since it isn't something I will be putting on the roadmap.

Originally posted by @SwampDragons in hashicorp/packer#6681 (comment)

The problem with the windows updates that you dont know how often the machine needs to restart and at the same time you want to stay in sync with the pipeline.

Even Microsoft does not execute the Windows Updates more than once, but after the execution of the script and a reboot there are still more updates available: https://github.com/actions/runner-images/blob/main/images/win/scripts/Installers/Install-WindowsUpdates.ps1

Someone had a similar problem, but i can totally understand that you wont implement loops for that matter:
hashicorp/packer#6681

Is there another solution for Azure ARM or in general?

@blitzeisschoenaufpassen
Copy link

blitzeisschoenaufpassen commented Mar 17, 2023

How am i able to install packer plugins in a json configuration?

How does this plugin help me with my problem?
image
There is nothing mentioned regarding reboots and windows updates.

@nkadel
Copy link

nkadel commented Apr 25, 2023

It's not mentioned because it is explicitly a vendor architecture problem. Part of the difficulty is updates that require multiple reboots. In theory, for the hosts that require multiple reboots like Windows boxes. There is some documentation at https://answers.microsoft.com/en-us/windows/forum/all/start-windows-update-windows-10-from-command-line/c4bec909-05ac-4b24-a0ab-7a83124923a8 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants