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 authored and GitHub committed 2020-04-28 19:11:33 +02:00
1 parent 12cc18d64b
commit 6cd6f0d802
1 file changed
+6
@@ -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)