diff --git a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java index fd33bed50c36..3dc45b685840 100644 --- a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -424,14 +424,7 @@ public DeployDestination planDeployment(VirtualMachineProfile vmProfile, Deploym } } else { if (host.getStatus() == Status.Up) { - boolean hostTagsMatch = true; - if(offering.getHostTag() != null){ - _hostDao.loadHostTags(host); - if (!(host.getHostTags() != null && host.getHostTags().contains(offering.getHostTag()))) { - hostTagsMatch = false; - } - } - if (hostTagsMatch) { + if (checkVmProfileAndHost(vmProfile, host)) { long cluster_id = host.getClusterId(); ClusterDetailsVO cluster_detail_cpu = _clusterDetailsDao.findDetail(cluster_id, "cpuOvercommitRatio");