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

F #4474: preparing vCPU for numa and pinning (#4614)

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera 2020-04-28 13:11:33 -04:00 committed by GitHub
parent 12cc18d64b
commit 6cd6f0d802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1261,6 +1261,12 @@ module VCenterDriver
:extraConfig => extraconfig,
:deviceChange => device_change
}
num_cores = one_item["USER_TEMPLATE/CORES"] || num_cpus.to_i
if num_cpus.to_i % num_cores.to_i != 0
num_cores = num_cpus.to_i
end
spec_hash[:numCoresPerSocket] = num_cores.to_i
spec_hash[:bootOptions] = boot_opts if boot_opts
spec = RbVmomi::VIM.VirtualMachineConfigSpec(spec_hash)