Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2109643

Summary: [RFE] Mechanism for determining preferred CPU model
Product: Red Hat Enterprise Linux 9 Reporter: sgott
Component: libvirtAssignee: Tim Wiederhake <twiederh>
libvirt sub component: General QA Contact: Luyao Huang <lhuang>
Status: CLOSED NOTABUG Docs Contact:
Severity: urgent    
Priority: unspecified CC: ailan, fdeutsch, jsuchane, lmen, twiederh, virt-maint, xuzhang
Version: unspecifiedKeywords: FutureFeature, Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-12 09:56:24 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1856522    
Bug Blocks:    

Description sgott 2022-07-21 16:56:44 UTC
Description of problem:

In the context of migration, CNV is trying to determine the best baseline CPU model to use. The idea would be that all nodes could default to this model if one is not otherwise defined for a VM. This would ensure a higher degree of compatibility with respect to migrating VMs between nodes. It's possible with existing APIs to determine the common subset of CPU models that nodes might have, but past that there's no hint to help decide which one might be preferred. For instance, newer CPUs generally have more features than older ones.

While an arbitrary static list of prefered models could be determined at the CNV level, it's going to get out of date over time. It would likely be better if libvirt or qemu were able to provide some mechanism for helping decide which CPU model would be preferred from a group of models.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Tim Wiederhake 2022-10-07 17:52:42 UTC
I am not sure that I understand the question correctly. The nodes' domain capabilities (`virsh domcapabilities > domcap_$HOSTNAME.xml`) can be used to calculate the baseline cpu model that is compatible with all nodes (`cat domcap_*.xml | virsh hypervisor-cpu-baseline /dev/stdin --migratable`). This cpu model enables all features that are present on all nodes and would be the "best".

Comment 4 Fabian Deutsch 2022-10-10 07:52:49 UTC
Hi Tim, a fair point.

Will the baseline CPU recommendation always only be one CPU?
If it might recommend multiple, then we'll need the ability to understand which the most recent one is.

Comment 5 Tim Wiederhake 2022-10-10 17:08:17 UTC
There will always be exactly one baseline (or none, in case there is no cpu model that is compatible with all nodes).

Note that this cpu model might not have a physical counterpart, ie. not be exactly one of the named cpu models. It will most likely be something equivalent to "CPU XYZ plus features A, B, and C". Append "--features" to the call to "virsh hypervisor-cpu-baseline ..." to get a full list of features in the resulting cpu models.

Comment 7 Jaroslav Suchanek 2023-07-12 09:56:24 UTC
There is nothing actionable here, I believe Tim's comment 5 provided the required answer. Please note that the cpu models handling in libvirt is being refactored and will be part of large scale of changes. Related feature requests will be created accordingly.