Skip to content

Commit b466729

Browse files
committed
CLOUDSTACK-3501. Cannot create instances on XenServer with multiple cores in a socket. If
details has information on cores per socket, create an instance accordingly. The vm record is populated with information on how many cores should be allowed in a socket.
1 parent 4a7b503 commit b466729

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ protected VM createVmFromTemplate(Connection conn, VirtualMachineTO vmSpec, Host
200200
vmr.platform = platform;
201201
}
202202

203+
String coresPerSocket = details.get("cpu.corespersocket");
204+
if (coresPerSocket != null) {
205+
Map<String, String> platform = vmr.platform;
206+
platform.put("cores-per-socket", coresPerSocket);
207+
vmr.platform = platform;
208+
}
209+
203210
vmr.VCPUsAtStartup = (long) vmSpec.getCpus();
204211
vmr.consoles.clear();
205212

0 commit comments

Comments
 (0)