mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CS-15551 : if 'xen.check.hvm' is false, don't check template hvm in allocator
This commit is contained in:
parent
7a5efcc2e8
commit
829acf6e27
@ -81,6 +81,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;
|
||||
|
||||
@ -343,6 +344,9 @@ public class FirstFitAllocator implements HostAllocator {
|
||||
}
|
||||
|
||||
protected boolean hostSupportsHVM(HostVO host) {
|
||||
if ( !_checkHvm ) {
|
||||
return true;
|
||||
}
|
||||
// Determine host capabilities
|
||||
String caps = host.getCapabilities();
|
||||
|
||||
@ -411,6 +415,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…
x
Reference in New Issue
Block a user