Repository navigation
Conversation
VideoDef now maps the video.hardware detail through an enum of the model types libvirt accepts, and CpuModeDef only accepts plain QEMU model names for guest.cpu.model. Unknown values are ignored with a warning and the agent default is used instead, like the agent already does for disk controllers, NIC models and the TPM.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14422 +/- ##
============================================
- Coverage 20.39% 20.39% -0.01%
+ Complexity 21283 21281 -2
============================================
Files 6481 6481
Lines 588040 588079 +39
Branches 72021 72029 +8
============================================
Hits 119957 119957
- Misses 455052 455097 +45
+ Partials 13031 13025 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The KVM agent copies the
video.hardwareandguest.cpu.modelVM details into the domain XML as-is. Every other detail that ends up in the XML (disk controller, NIC model, TPM) is mapped through an enum first, these two were the exception.VideoDefnow has aVideoModelenum with the model types libvirt accepts (vga, cirrus, vmvga, xen, vbox, qxl, virtio, gop, bochs, ramfb, none), matched case-insensitively.CpuModeDefonly accepts plain QEMU model names such asNehalem,EPYC-Rome-v2orx86-64-v2. An unknown value is logged and ignored, the agent property or the x86 default is used instead. libvirt rejects unknown model types anyway, so existing working setups are unaffected.Types of changes
Feature/Enhancement Scale or Bug Severity
How Has This Been Tested?
Unit tests added to
LibvirtVMDefTestandLibvirtComputingResourceTest, covering case-insensitive matching, an unknown agent property, an unknown detail and the fallback to the agent default. Both classes pass.