Skip to content

feat: Add fix for BSOD in Windows 11 24H2 when Bitlocker is enabled #728

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

ksimon1
Copy link
Member

@ksimon1 ksimon1 commented Jun 6, 2025

What this PR does / why we need it:
feat: Add fix for BSOD in Windows 11 24H2 when Bitlocker is enabled

https://learn.microsoft.com/en-us/answers/questions/1843393/windows-11-24h2-26100-1150-sysprep-generalize-brea?source=docs
This should be workaround for win11 bsod caused by bitlocker

Release note:

feat: Add fix for BSOD in Windows 11 24H2 when Bitlocker is enabled

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 6, 2025
@openshift-ci openshift-ci bot requested review from akrejcir and jcanocan June 6, 2025 08:12
@kubevirt-bot kubevirt-bot requested a review from geetikakay June 6, 2025 08:12
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2025
@ksimon1
Copy link
Member Author

ksimon1 commented Jun 6, 2025

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 6, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ksimon1 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -245,20 +245,36 @@ data:
</AutoLogon>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>bcdedit /set device partition=C:</CommandLine>
<CommandLine>PowerShell -ExecutionPolicy Bypass -NoProfile F:\post-update.ps1</CommandLine>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: DRY up duplicate script block in release and template files

Extract the shared post-update.ps1 injection into a common include to simplify future updates.

Suggested implementation:

          <FirstLogonCommands>
            <!--#include virtual="post-update-command.xml" -->
            <SynchronousCommand wcm:action="add">
              <CommandLine>reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine>
              <RequiresUserInput>false</RequiresUserInput>
              <Order>2</Order>
              <Description>Set AutoLogonCount to 0</Description>

  1. Create a new file named post-update-command.xml in the same directory with the following content:
<SynchronousCommand wcm:action="add">
  <CommandLine>PowerShell -ExecutionPolicy Bypass -NoProfile F:\post-update.ps1</CommandLine>
  <Order>1</Order>
</SynchronousCommand>
  1. If you use a different templating system (e.g., Helm, ytt, kustomize), adjust the include syntax accordingly (e.g., {{ include "post-update-command" }} for Helm).
  2. Apply the same include in any other files (such as release files) that previously duplicated this block.

@jcanocan
Copy link
Contributor

jcanocan commented Jun 6, 2025

Nice job, and thanks for your persistence with this!
It looks good to me, nothing to add regarding the xml modifications.
However, I would be a bit more descriptive with the NOTES. E.g.,

feat: Add fix for BSOD in Windows 11 24H2 when Bitlocker is enabled

@0xFelix
Copy link
Member

0xFelix commented Jun 6, 2025

Not sure I like the wording of "official fix", since this needs to be fixed within Windows afterall, but it's a viable workaround.

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

openshift-ci bot commented Jun 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix, ksimon1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -245,20 +245,36 @@ data:
</AutoLogon>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>bcdedit /set device partition=C:</CommandLine>
<CommandLine>PowerShell -ExecutionPolicy Bypass -NoProfile F:\post-update.ps1</CommandLine>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I preferred to enumerate all drives for the post-update script, instead of hardcoding F:. F: means that you exactly know that Windows has only one drive C:, the second drive D: is a Windows ISO, etc...

@ksimon1
Copy link
Member Author

ksimon1 commented Jun 12, 2025

/hold cancel

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 12, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 12, 2025
@ksimon1 ksimon1 changed the title feat: update unattend.xml for win11 example with official MS fix feat: Add fix for BSOD in Windows 11 24H2 when Bitlocker is enabled Jun 12, 2025
@jcanocan
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2025
@kubevirt-bot kubevirt-bot merged commit 3280440 into kubevirt:main Jun 12, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants