1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

M #-: Add cpu model and features on dummy drivers (#2924)

Signed-off-by: David Carracedo <dcarracedo@opennebula.io>
This commit is contained in:
David 2024-02-06 17:41:43 +01:00 committed by GitHub
parent a1059292a1
commit f4067fe9dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -123,7 +123,11 @@ export const getPciDevices = (host) =>
*/
export const getKvmCpuModels = (hosts = []) => {
const hostData = hosts
.filter((host) => host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.kvm)
.filter(
(host) =>
host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.kvm ||
host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.dummy
)
.map((host) => host.TEMPLATE?.KVM_CPU_MODELS.split(' '))
.flat()
@ -140,7 +144,11 @@ export const getKvmCpuModels = (hosts = []) => {
export const getKvmCpuFeatures = (hosts = []) => {
const wrapHosts = Array.isArray(hosts) ? hosts : [hosts]
const machineTypes = wrapHosts
?.filter((host) => host?.TEMPLATE?.HYPERVISOR === HYPERVISORS?.kvm)
?.filter(
(host) =>
host?.TEMPLATE?.HYPERVISOR === HYPERVISORS?.kvm ||
host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.dummy
)
?.map((host) => host?.TEMPLATE?.KVM_CPU_FEATURES?.split(',') ?? [])
?.flat()

View File

@ -124,6 +124,8 @@ def system
DS_LOCATION_USED_MB=9720
DS_LOCATION_TOTAL_MB=20480
DS_LOCATION_FREE_MB=20480
KVM_CPU_MODELS="486 pentium pentium2 pentium3 pentiumpro coreduo n270 core2duo qemu32 kvm32 cpu64-rhel5 cpu64-rhel6 kvm64 Conroe Penryn Nehalem Nehalem-IBRS Westmere Westmere-IBRS SandyBridge SandyBridge-IBRS IvyBridge IvyBridge-IBRS SapphireRapids SapphireRapids-noTSX Opteron_G1"
KVM_CPU_FEATURES="vme,ds,acpi,ss,ht,tm,pbe,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,xtpr,pdcm,osxsave,f16c,rdrand,arat,tsc_adjust,clflushopt,clwb,intel-pt,sha-ni,umip,pku,ospke,waitpkg,gfni,vaes,vpclmulqdq,rdpid,movdiri,movdir64b,pks,fsrm,md-clear,serialize,arch-lbr,stibp,arch-capabilities,core-capability,ssbd,avx-vnni,xsaveopt,xsavec,xgetbv1,xsaves,pdpe1gb,abm,invtsc,rdctl-no,ibrs-all,skip-l1dfl-vmentry,mds-no,pschange-mc-no"
EOS
end