Skip to content
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

virsh capabilities output missing full list of CPU features #6686

Closed
1 of 3 tasks
OpenNebulaSupport opened this issue Aug 5, 2024 · 1 comment · Fixed by OpenNebula/docs#3018
Closed
1 of 3 tasks

Comments

@OpenNebulaSupport
Copy link
Collaborator

OpenNebulaSupport commented Aug 5, 2024

Description
According to the libvirt documentation the output of the virsh capabilities command among other information provides

  1. baseline CPU model within <model> tags and under /capabilities/host/cpu/model path;
  2. the list of extra CPU features which are not included in the baseline CPU model.

The OpenNebula cpu_features.sh script producing the value for the KVM_CPU_FEATURES attribute relies on the output of the virsh capabilities command.
Having the hosts with different baseline CPU models within a single cluster may lead the situation when virsh capabilities output has certain CPU feature mention explicitly for some of the hosts and doesn't have such feature mentioned for others because their baseline CPU model already assumes its support.

For example, the f16c CPU feature is not included in the Broadwell-noTSX-IBRS CPU baseline model, i.e. the following command has an empty output:

grep -i f16c /usr/share/libvirt/cpu_map/x86_Broadwell-noTSX-IBRS.xml

But virsh capabilities output has that feature mentioned for the same host in the additional list of the features:

<capabilities>
  <host>
    <cpu>
         ...
      <model>Broadwell-noTSX-IBRS</model>
           ...
      <feature name='f16c'/>
          ....
     </cpu>
      ...
  </host>
   ....
</capabilities>

Whereas e.g. for the Skylake-Server-IBRS baseline CPU model the f16c feature is already included in the cpu_map file:

grep -i f16c /usr/share/libvirt/cpu_map/x86_Skylake-Server-IBRS.xml
    <feature name='f16c'/>

But because of that the f16c feature is not mentioned in the virsh capabilities output for the host with such baseline CPU model.
If there is a VM template which mentions explicitly certain set of CPU features among of which e.g. is f16c then the host with Skylake-Server-IBRS baseline CPU model won't be considered as a candidate for such VM dispatching by the OpenNebula scheduler despite the fact the host supports that f16c feature.

Expected behavior
It is expected to have in a value of the KVM_CPU_FEATURES attribute the full list of supported CPU features.

Proposed Solution
One of the possible solution to get a full list of features is to use virsh cpu-baseline command with --features argument run against virsh capabilities output.

Details

  • Affected Component: drivers
  • Hypervisor: KVM
  • Version: development

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
@rsmontero rsmontero added this to the Release 6.10.0 milestone Aug 6, 2024
@mkutouski mkutouski self-assigned this Aug 6, 2024
mkutouski added a commit to OpenNebula/docs that referenced this issue Aug 7, 2024
Signed-off-by: Mikalai Kutouski <mkutouski@opennebula.io>
rsmontero pushed a commit to OpenNebula/docs that referenced this issue Aug 7, 2024
Signed-off-by: Mikalai Kutouski <mkutouski@opennebula.io>
@mkutouski
Copy link
Contributor

I leave that URL here OpenNebula/docs#3018 to be linked with that issue.

@tinova tinova linked a pull request Aug 22, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment