diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java index 2efce066b0c2..bde101c6adad 100644 --- a/server/src/com/cloud/resource/ResourceManagerImpl.java +++ b/server/src/com/cloud/resource/ResourceManagerImpl.java @@ -679,6 +679,12 @@ private List discoverHostsFull(final Long dcId, final Long podId, Long c } } + if ((hypervisorType.equalsIgnoreCase(HypervisorType.BareMetal.toString()))) { + if (hostTags.isEmpty()) { + throw new InvalidParameterValueException("hosttag is mandatory while adding host of type Baremetal"); + } + } + if (clusterName != null) { final HostPodVO pod = _podDao.findById(podId); if (pod == null) {