Skip to content

Fix nic adapater and root disk controller for UEFI VMs#13108

Draft
harikrishna-patnala wants to merge 1 commit intoapache:4.20from
shapeblue:FixUefiVMs
Draft

Fix nic adapater and root disk controller for UEFI VMs#13108
harikrishna-patnala wants to merge 1 commit intoapache:4.20from
shapeblue:FixUefiVMs

Conversation

@harikrishna-patnala
Copy link
Copy Markdown
Member

@harikrishna-patnala harikrishna-patnala commented May 6, 2026

Description

The PR fixes the issue #11212

Issue: UEFI-based VMs on KVM were unable to attach more than a few additional disks or NICs because the default disk bus selection caused higher PCI device usage, leading to PCI slot exhaustion.

Fix: Updated the guest disk bus selection logic to use SCSI for Linux-based UEFI guests instead of VIRTIO, which reduces PCI device usage and improves support for attaching additional volumes and network interfaces. Existing Windows and non-UEFI behavior remains unchanged.

Scenario Old New
UEFI + Linux VIRTIO SCSI
UEFI + Windows SATA SATA (same)
Non-UEFI Linux VIRTIO VIRTIO (same)

Fixed NIC attachment issues for UEFI VMs by defaulting the NIC adapter to e1000 when UEFI is enabled and no NIC adapter is explicitly specified.

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?

@harikrishna-patnala
Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 26.66667% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.26%. Comparing base (ae5308b) to head (f043710).
⚠️ Report is 47 commits behind head on 4.20.

Files with missing lines Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 26.66% 7 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #13108      +/-   ##
============================================
+ Coverage     16.25%   16.26%   +0.01%     
- Complexity    13420    13440      +20     
============================================
  Files          5662     5665       +3     
  Lines        500161   500559     +398     
  Branches      60730    60791      +61     
============================================
+ Hits          81300    81440     +140     
- Misses       409777   410011     +234     
- Partials       9084     9108      +24     
Flag Coverage Δ
uitests 4.15% <ø> (-0.01%) ⬇️
unittests 17.12% <26.66%> (+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.

if (params != null && params.get(VmDetailConstants.NIC_ADAPTER) != null && !params.get(VmDetailConstants.NIC_ADAPTER).isEmpty()) {
nicAdapter = params.get(VmDetailConstants.NIC_ADAPTER);
} else if (MapUtils.isNotEmpty(params) && params.containsKey(GuestDef.BootType.UEFI.toString())) {
nicAdapter = "e1000";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

any reason of this change ?

@blueorangutan
Copy link
Copy Markdown

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

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.

3 participants