mirror of https://github.com/apache/cloudstack.git
CS-15551 : if 'xen.check.hvm' is false, don't check template hvm in allocator
This commit is contained in:
parent
9c36ba1ac4
commit
970bdb3972
|
|
@ -77,6 +77,7 @@ public class FirstFitAllocator implements HostAllocator {
|
|||
@Inject VMInstanceDao _vmInstanceDao = null;
|
||||
@Inject ResourceManager _resourceMgr;
|
||||
float _factor = 1;
|
||||
boolean _checkHvm = true;
|
||||
protected String _allocationAlgorithm = "random";
|
||||
@Inject CapacityManager _capacityMgr;
|
||||
|
||||
|
|
@ -331,6 +332,9 @@ public class FirstFitAllocator implements HostAllocator {
|
|||
}
|
||||
|
||||
protected boolean hostSupportsHVM(HostVO host) {
|
||||
if ( !_checkHvm ) {
|
||||
return true;
|
||||
}
|
||||
// Determine host capabilities
|
||||
String caps = host.getCapabilities();
|
||||
|
||||
|
|
@ -399,6 +403,8 @@ public class FirstFitAllocator implements HostAllocator {
|
|||
if (allocationAlgorithm != null) {
|
||||
_allocationAlgorithm = allocationAlgorithm;
|
||||
}
|
||||
String value = configs.get("xen.check.hvm");
|
||||
_checkHvm = value == null ? true : Boolean.parseBoolean(value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue