diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 2ca58c6b50d..6d36a070291 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -1054,6 +1054,11 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy Map> suitableVolumeStoragePools = new HashMap>(); List readyAndReusedVolumes = new ArrayList(); + // There should be atleast the ROOT volume of the VM in usable state + if (volumesTobeCreated.isEmpty()) { + throw new CloudRuntimeException("Unable to create deployment, no usable volumes found for the VM"); + } + // for each volume find list of suitable storage pools by calling the // allocators for (VolumeVO toBeCreated : volumesTobeCreated) {