diff --git a/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java b/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java index eefb6fa65ef..cf6471018cf 100644 --- a/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java +++ b/server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java @@ -146,9 +146,11 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement } /*hypervisor type is correct*/ + // TODO : when creating a standalone volume, offering is passed as NULL, need to + // refine the logic of checking hypervisorType based on offering info Long clusterId = pool.getClusterId(); ClusterVO cluster = _clusterDao.findById(clusterId); - if (!cluster.getHypervisorType().equalsIgnoreCase(offering.gethypervisorType())) { + if (offering != null && !cluster.getHypervisorType().equalsIgnoreCase(offering.gethypervisorType())) { return false; } // check the used size against the total size, skip this host if it's greater than the configured