CLOUDSTACK-5891.[VMware] If a template has been registered and "cpu.corespersocket=X" template details have been added for it,

then any instance deployed from that template should have X cores per socket
This commit is contained in:
Likitha Shetty 2013-11-26 15:22:58 +05:30 committed by Sebastien Goasguen
parent 1772fcffc3
commit 08e571eefe
1 changed files with 6 additions and 0 deletions

View File

@ -2765,6 +2765,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
vmConfigSpec.setCpuHotAddEnabled(vmMo.isCpuHotAddSupported(guestOsId));
configNestedHVSupport(vmMo, vmSpec, vmConfigSpec);
// Check for multi-cores per socket settings
String coresPerSocket = vmSpec.getDetails().get("cpu.corespersocket");
if (coresPerSocket != null) {
vmConfigSpec.setNumCoresPerSocket(NumbersUtil.parseInt(coresPerSocket, 1));
}
VirtualDeviceConfigSpec[] deviceConfigSpecArray = new VirtualDeviceConfigSpec[totalChangeDevices];
int i = 0;
int ideUnitNumber = 0;