Skip to content

Conversation

shwstppr
Copy link
Contributor

Description

Fixes #9460

A VM or template detail can be added with key skip.force.disk.controller and value true to allow skipping forcing disk controllers for the VM especially in case of UEFI VMs.
Otherwise, current behaviour of disk controllers depend on the guest OS, UEFI secure boot where Windows VM may always be provisioned with sata and other OS VMs with virtio.

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

A VM or template detail can be added with key `skip.force.disk.controller` and value `true` to allow skipping forcing disk controllers for the VM especially in case of UEFI VMs.
Otherwise, current behaviour of disk controllers depend on the guest OS, UEFI secure boot where Windows VM may always be provisioned with `sata` and other OS VMs with `virtio`.

Signed-off-by: Abhishek Kumar <[email protected]>
@shwstppr
Copy link
Contributor Author

@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.

@weizhouapache weizhouapache added this to the 4.20.2 milestone Sep 29, 2025
@blueorangutan
Copy link

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

@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 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 15219

@vishesh92 vishesh92 requested a review from Copilot September 30, 2025 13:01
@vishesh92
Copy link
Member

@blueorangutan package

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds functionality to allow skipping disk controller forcing for KVM VMs by introducing a new VM detail flag. The enhancement improves flexibility for UEFI VMs that may have specific disk controller requirements.

Key changes:

  • Introduces a new VM detail constant skip.force.disk.controller to bypass default disk controller logic
  • Extracts disk definition logic into a separate method for better testability and maintainability
  • Adds comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
VmDetailConstants.java Adds new constant for the skip force disk controller feature
LibvirtComputingResource.java Refactors disk definition logic and implements the skip functionality
LibvirtComputingResourceTest.java Adds test coverage for the new disk definition method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@shwstppr shwstppr marked this pull request as ready for review September 30, 2025 13:21
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.18%. Comparing base (2e113e5) to head (dfa2832).

Files with missing lines Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 78.57% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #11750   +/-   ##
=========================================
  Coverage     15.18%   15.18%           
- Complexity    11370    11373    +3     
=========================================
  Files          5415     5415           
  Lines        476082   476091    +9     
  Branches      58129    58131    +2     
=========================================
+ Hits          72288    72304   +16     
+ Misses       395702   395694    -8     
- Partials       8092     8093    +1     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.91% <78.57%> (+<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.

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

@vishesh92
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@vishesh92 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15246

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-14511)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 46129 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11750-t14511-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

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
5 participants