Spaceman1984 commented on a change in pull request #4447:
URL: https://github.com/apache/cloudstack/pull/4447#discussion_r518549353
##########
File path:
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/XenServerGuru.java
##########
@@ -98,7 +98,12 @@ public VirtualMachineTO implement(VirtualMachineProfile vm) {
if (userVmVO != null) {
HostVO host = hostDao.findById(userVmVO.getHostId());
if (host != null) {
-
to.setVcpuMaxLimit(MaxNumberOfVCPUSPerVM.valueIn(host.getClusterId()));
+ // Max cpu cannot be more than host capability
+ if (host.getCpus() <
MaxNumberOfVCPUSPerVM.valueIn(host.getClusterId()))
+ to.setVcpuMaxLimit(host.getCpus());
Review comment:
I kept the global var in to allow things like if you have a host with 32
pCPUs but want to set a lower max vCPU limit for a VM for the purpose of
dynamic scaling.
As for the ability to force overcommit - This is not reccommended in the
article and I would think not best practice, that's why I would vote no.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]