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

Win2022server OS corrupted/broken #13102

Open
TadasNRK opened this issue Jul 9, 2024 · 1 comment
Open

Win2022server OS corrupted/broken #13102

TadasNRK opened this issue Jul 9, 2024 · 1 comment

Comments

@TadasNRK
Copy link

TadasNRK commented Jul 9, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

After creating a Windows server 2022 with Packer, we noticed it is with corrupted Operating System. Some manifest files are missing. Due to this issue OS could not be patched. The only fix is to do in place upgrade for an OS from an ISO.
Strange thing what we observed is windows update size about 25GB for the patch KB5039227.
Based on Microsoft library, this KB size is about 340MB.

Why we see such a big size in the packer logs?

Reproduction Steps

Create template for the win2022 server from an older ISO image.

Packer version

[v1.11.1]

Operating system and Environment details

Used ISO image for Windows server 2022 template creation is : SW_DVD9_Win_Server_STD_CORE_2022_2108.19_64Bit_English_DC_STD_MLF_X23-40586.ISO

Used plugins:

Installed plugin github.com/rgl/windows-update v0.14.3 in "/root/.config/packer/plugins/github.com/rgl/windows-update/packer-plugin-windows-update_v0.14.3_x5.0_linux_amd64"
Installed plugin github.com/hashicorp/vsphere v1.3.0 in "/root/.config/packer/plugins/github.com/hashicorp/vsphere/packer-plugin-vsphere_v1.3.0_x5.0_linux_amd64"

Log Fragments and crash.log files

==> win2022.vsphere-iso.windows-template: Uploading the Windows update elevated script...
==> win2022.vsphere-iso.windows-template: Uploading the Windows update check for reboot required elevated script...
==> win2022.vsphere-iso.windows-template: Uploading the Windows update script...
==> win2022.vsphere-iso.windows-template: Running Windows update...
win2022.vsphere-iso.windows-template: Searching for Windows updates...
win2022.vsphere-iso.windows-template: Found Windows update (2022-08-09; 0.07 MB): 2022-08 Security Update for Microsoft server operating system version 21H2 for x64-based Systems (KB5012170)
win2022.vsphere-iso.windows-template: Found Windows update (2024-05-14; 66.77 MB): 2024-05 Cumulative Update for .NET Framework 3.5, 4.8 and 4.8.1 for Microsoft server operating system version 21H2 for x64 (KB5038282)
win2022.vsphere-iso.windows-template: Found Windows update (2024-06-11; 69.39 MB): Windows Malicious Software Removal Tool x64 - v5.125 (KB890830)
win2022.vsphere-iso.windows-template: Found Windows update (2024-06-21; 148.33 MB): Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.413.438.0) - Current Channel (Broad)
win2022.vsphere-iso.windows-template: Found Windows update (2024-06-11; 25371.39 MB): 2024-06 Cumulative Update for Microsoft server operating system version 21H2 for x64-based Systems (KB5039227)
win2022.vsphere-iso.windows-template: Downloading Windows updates (5 updates; 25655.94 MB)...
win2022.vsphere-iso.windows-template: Installing Windows updates...

@TadasNRK TadasNRK added the bug label Jul 9, 2024
@lbajolet-hashicorp
Copy link
Contributor

Hi @TadasNRK,

Hard to say why the patch is this big, but at first glance this is probably unrelated to Packer.
The windows-update plugin is the one performing the action here, so this would probably be where to look if this is a bug.

As for why the OS image is corrupted, it's also hard to say without more information, other users manage to build Windows images AFAICT, but that doesn't completely rule out a bug being the cause of what goes wrong in your case.

In order to determine the problem we'll need more information, namely a minimal template that exhibits the problem is possible, and the full verbose logs so we can take a look at this.

Thanks!

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

No branches or pull requests

2 participants