Skip to content

kvm: fix disk controller for secure boot vm #10213

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

Draft
wants to merge 3 commits into
base: 4.19
Choose a base branch
from

Conversation

shwstppr
Copy link
Contributor

Description

Fixes #9460

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Fixes apache#9460

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Contributor Author

shwstppr commented Jan 20, 2025

This would fix the issue but not sure if could cause the issue of disks not being identified when virtio drivers are not installed. Maybe we can add some documentation. ping @pavanaravapalli, if you've any advise

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 15.16%. Comparing base (422264f) to head (9406e6e).
Report is 1 commits behind head on 4.19.

Files with missing lines Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10213   +/-   ##
=========================================
  Coverage     15.16%   15.16%           
- Complexity    11332    11339    +7     
=========================================
  Files          5412     5412           
  Lines        475033   475038    +5     
  Branches      57963    57964    +1     
=========================================
+ Hits          72048    72057    +9     
+ Misses       394930   394924    -6     
- Partials       8055     8057    +2     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.89% <90.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12127

} else {
disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.DiskFmtType.QCOW2);
}
disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.DiskFmtType.QCOW2);
Copy link
Member

Choose a reason for hiding this comment

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

for DATADISK, should it use diskBusTypeData instead ?

} else {
disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.DiskFmtType.QCOW2);
}
disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.DiskFmtType.QCOW2);
Copy link
Contributor

@pavanaravapalli pavanaravapalli Jan 20, 2025

Choose a reason for hiding this comment

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

@shwstppr
When the uefi functionality implemented there is a issue with (Windows Guest VM + Secure Boot ) Disk controller for disk using virtio, hence it's been set for windows guest vm -> sata, Linux guest vm -> virtio as disk controller.
these code changes will break the uefi functionality for windows guest vm with secure boot.

right now I don't have setup to test the functionality, it will be good If you can test the scenario and confirm that this won't break windows guest vm along with secure boot use-case .

And this behavior always over-rides the os configuration setting, no matter what controller configured in the OS details. Which needs to be addressed if the above use-case is not broken. Other wise we need to find a mid-way to fix both.

A VM or template detail can be added with key `win.skip.force.disk.controller` and value `true` to allow skipping forcing DATA disk controller for the VM.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@shwstppr
Copy link
Contributor Author

@pavanaravapalli @weizhouapache cc @rajujith @vladimirpetrov I've made the behaviour configurable using VM (or template) detail. User/operator can add a VM/template detail - win.skip.force.disk.controller = true to make KVM plugin not force SATA controller for Windows VM with secured boot

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 13161

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13164

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

Successfully merging this pull request may close these issues.

RootDiskController setting not Honored throughout Instance lifecycle
4 participants