mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2567 - check for ! dmcEnabled.
This commit is contained in:
parent
4e09079640
commit
a67728b312
@ -661,8 +661,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
Set<VM> vms = VM.getByNameLabel(conn, vmName);
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
|
||||
// If DMC is not enable then dont execute this command.
|
||||
if (isDmcEnabled(conn, host)) {
|
||||
// If DMC is not enable then don't execute this command.
|
||||
if (!isDmcEnabled(conn, host)) {
|
||||
String msg = "Unable to scale the vm: " + vmName + " as DMC - Dynamic memory control is not enabled for the XenServer:" + _host.uuid + " ,check your license and hypervisor version.";
|
||||
s_logger.info(msg);
|
||||
return new ScaleVmAnswer(cmd, false, msg);
|
||||
|
||||
@ -244,6 +244,9 @@ public class XenServer56FP1Resource extends XenServer56Resource {
|
||||
protected boolean isDmcEnabled(Connection conn, Host host) throws XenAPIException, XmlRpcException {
|
||||
Map<String, String> hostParams = new HashMap<String, String>();
|
||||
hostParams = host.getLicenseParams(conn);
|
||||
return hostParams.get("restrict_dmc").equalsIgnoreCase("false");
|
||||
|
||||
Boolean isDmcEnabled = hostParams.get("restrict_dmc").equalsIgnoreCase("false");
|
||||
|
||||
return isDmcEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user