diff --git a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java index e6b4ad4ab9f..f84033cb52d 100755 --- a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java +++ b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java @@ -282,6 +282,7 @@ public class FirstFitAllocator implements HostAllocator { String templateGuestOSCategory = getTemplateGuestOSCategory(template); List prioritizedHosts = new ArrayList(); + List noHvmHosts = new ArrayList(); // If a template requires HVM and a host doesn't support HVM, remove it from consideration List hostsToCheck = new ArrayList(); @@ -289,12 +290,19 @@ public class FirstFitAllocator implements HostAllocator { for (HostVO host : hosts) { if (hostSupportsHVM(host)) { hostsToCheck.add(host); + } else { + noHvmHosts.add(host); } } } else { hostsToCheck.addAll(hosts); } + if (s_logger.isDebugEnabled()) { + if (noHvmHosts.size() > 0) { + s_logger.debug("Not considering hosts: " + noHvmHosts + " to deploy template: " + template +" as they are not HVM enabled"); + } + } // If a host is tagged with the same guest OS category as the template, move it to a high priority list // If a host is tagged with a different guest OS category than the template, move it to a low priority list List highPriorityHosts = new ArrayList();