Open FedorRub opened 2 years ago
I'm also clueless about the problem.
I've noticed the memory usage might be too high. Maybe try to give it 8GB RAM to see if it helps.
I tried increasing the memory to 8GB to no avail. I forgot to mention that this also happens with Windows Server 2016 with hyperv-iso builder. So I suspect something broke after latest rounds of WU. Is there any debug info I can get from the running vm that could help you identify the problem?
Maybe there are logs somewhere, but I never needed to look at them, so I do not known where to look exactly.
There's one thing that you might need: install Servicing Stack Update for Windows
before anything else, like in:
https://github.com/rgl/windows-vagrant/blob/master/windows-2016.pkr.hcl#L201-L208
That sounds promising! Let me try that!
So far, I am not having a lot of luck with Windows Server 2016 Standard template. I tried installing Servicing Stack Update for Windows, uninstalling Windows Defender (In case defender updates were causing the issue), and running Disable-windows-updates.ps1 script. Unfortunately, the build is stuck on applying windows updates forever. The only difference I see between our templates is that you are using Datacenter edition ISO while I am using Windows Server Standard ISO. Out of curiosity if you run your build of Windows 2016 server does it complete successfully?
Even though its using the datacenter ISO (has multiple windows editions), its actually installing the standard edition.
The last time I've tried (couple of months ago), all of the images in the windows-vagrant repo worked. I'll try windows-2016 today, and will let you known.
Hi @rgl. I was wondering if you had a chance to run Win2016 build?
Sorry, forgot about this. Just tried it, and it worked:
==> qemu.windows-2016-amd64: Uploading the Windows update elevated script...
==> qemu.windows-2016-amd64: Uploading the Windows update check for reboot required elevated script...
==> qemu.windows-2016-amd64: Uploading the Windows update script...
==> qemu.windows-2016-amd64: Running Windows update...
qemu.windows-2016-amd64: Searching for Windows updates...
qemu.windows-2016-amd64: Skipped (filter) Windows update (2018-05-17; 1273.25 MB): 2018-05 Cumulative Update for Windows Server 2016 for x64-based Systems (KB4103720)
qemu.windows-2016-amd64: Skipped (filter) Windows update (2021-09-14; 35.28 MB): Windows Malicious Software Removal Tool x64 - v5.93 (KB890830)
qemu.windows-2016-amd64: Found Windows update (2021-09-14; 11.42 MB): 2021-09 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB5005698)
qemu.windows-2016-amd64: Downloading Windows updates (1 updates; 11.42 MB)...
qemu.windows-2016-amd64: Installing Windows updates...
==> qemu.windows-2016-amd64: Uploading the Windows update elevated script...
==> qemu.windows-2016-amd64: Uploading the Windows update check for reboot required elevated script...
==> qemu.windows-2016-amd64: Uploading the Windows update script...
==> qemu.windows-2016-amd64: Running Windows update...
qemu.windows-2016-amd64: Searching for Windows updates...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 38 % cpu; 77 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 63 % cpu; 89 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 48 % cpu; 87 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 47 % cpu; 27 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 50 % cpu; 28 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 51 % cpu; 26 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 59 % cpu; 26 % memory)...
qemu.windows-2016-amd64: Found Windows update (2021-01-12; 0.07 MB): Security Update for Windows Server 2016 for x64-based Systems (KB4535680)
qemu.windows-2016-amd64: Found Windows update (2021-03-09; 2.2 MB): 2021-01 Update for Windows Server 2016 for x64-based Systems (KB4589210)
qemu.windows-2016-amd64: Found Windows update (2021-09-14; 35.28 MB): Windows Malicious Software Removal Tool x64 - v5.93 (KB890830)
qemu.windows-2016-amd64: Found Windows update (2021-09-14; 1665.89 MB): 2021-09 Cumulative Update for Windows Server 2016 for x64-based Systems (KB5005573)
qemu.windows-2016-amd64: Downloading Windows updates (4 updates; 1703.45 MB)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 64 % cpu; 21 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 82 % cpu; 29 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 29 % cpu; 30 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 16 % cpu; 31 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 20 % cpu; 33 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 81 % cpu; 34 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 53 % cpu; 36 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 47 % cpu; 38 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 43 % cpu; 40 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 35 % cpu; 38 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 61 % cpu; 38 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 29 % cpu; 41 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 56 % cpu; 43 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 85 % cpu; 34 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 76 % cpu; 44 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 73 % cpu; 39 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 32 % cpu; 34 % memory)...
qemu.windows-2016-amd64: Installing Windows updates...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 41 % cpu; 30 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 70 % cpu; 29 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 47 % cpu; 31 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 52 % cpu; 31 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 50 % cpu; 31 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 49 % cpu; 32 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 43 % cpu; 32 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 53 % cpu; 32 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 46 % cpu; 33 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 60 % cpu; 37 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 56 % cpu; 38 % memory)...
qemu.windows-2016-amd64: Waiting for the Windows Modules Installer to exit...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 1 % cpu; 21 % memory)...
qemu.windows-2016-amd64: Waiting for operation to complete (system performance: 1 % cpu; 21 % memory)...
==> qemu.windows-2016-amd64: Restarting the machine...
==> qemu.windows-2016-amd64: Waiting for machine to become available...
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: A system shutdown is in progress.(1115)
==> qemu.windows-2016-amd64: Checking for pending restart...
qemu.windows-2016-amd64: VAGRANT-48DM8ET restarted.
==> qemu.windows-2016-amd64: Restart complete
==> qemu.windows-2016-amd64: Running Windows update...
qemu.windows-2016-amd64: Searching for Windows updates...
qemu.windows-2016-amd64: No Windows updates found
PS The whole Windows installation finished in about 3h.
PPS Windows 2019 (and 2022) Standard also worked.
Thanks for checking. It looks like something related to my environment, where updates never finish downloading from MS. I will try switching to updates from WSUS, see if that makes any difference.
I am having the exact same issue. I checked windows update and i too was stuck downloading and was stuck at 95%. This is also only happening for Windows Server 2016. 2012R2 and 2019 both worked for me. I actually left it running over night and it never completed even after running for 17 hours
I had the same behaviour, packer-plugin-windows-update detected on top of a vanilla image of Windows Server 2016 a first ste of few updates, installed these perfectly, and after the reboot it continued to search and download a second batch. Here it stuck... As observed by other above.
Finally, I figured out, it depends on plugin version. With 0.12 it works as expected, while it doesn't do the job with 0.14. @rgl Maybe useful to know for you. As some parts are encrypted, I cannot reproduce mannally yet.
I had the same behaviour, packer-plugin-windows-update detected on top of a vanilla image of Windows Server 2016 a first ste of few updates, installed these perfectly, and after the reboot it continued to search and download a second batch. Here it stuck... As observed by other above.
Finally, I figured out, it depends on plugin version. With 0.12 it works as expected, while it doesn't do the job with 0.14. @rgl Maybe useful to know for you. As some parts are encrypted, I cannot reproduce mannally yet.
Damned, now I face 16001... like described here: https://github.com/rgl/packer-plugin-windows-update/issues/65
"KB4589210: Intel microcode updates" should not be installed on VM
I am able to consistently reproduce that the linux version of packer-plugin-windows-update v0.14 will hang up for me every time when updating a Win2016 guest. It appears to work for the rest of Win2012-2022. If I use the same Packer template and binary version on Windows, the windows update plugin v0.14 works fine.
Maybe there are logs somewhere, but I never needed to look at them, so I do not known where to look exactly.
There's one thing that you might need: install
Servicing Stack Update for Windows
before anything else, like in:https://github.com/rgl/windows-vagrant/blob/master/windows-2016.pkr.hcl#L201-L208
nice find, this works for me as well
I recently encountered an issue, where updates on Windows Server 2016 never finish. Other Windows versions do not seem to be affected, so it could be related to a recent update. Windows Updates plugin is stuck after downloading updates and never proceeds to install. You can view the full log here. https://gist.github.com/FedorRub/5352c43be40a0a3c5bdbc1467a8a9221
When I login to vm console I see that updates are ready to be installed.
I use the following packer template for all windows builds. It has multiple calls to windows update provider for win2012-r2.