From 2ee927408c54ec10763d9aa55127b2c8efc7f44d Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 28 Aug 2023 11:08:24 +0200 Subject: [PATCH] Update plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java --- .../cloud/hypervisor/xenserver/resource/CitrixResourceBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java index e996f45afd27..aef8e54f0289 100644 --- a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java @@ -1338,7 +1338,7 @@ public VM createVmFromTemplate(final Connection conn, final VirtualMachineTO vmS vmr.VCPUsMax = (long)vmSpec.getCpus(); } else { if (vmSpec.getVcpuMaxLimit() != null) { - vmr.VCPUsMax = Math.min(vcpuMaxLimit, _host.getCpus()); + vmr.VCPUsMax = Math.min(vmSpec.getVcpuMaxLimit(), _host.getCpus()); } } } else {