diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java index 4df7eb4fd5d..65a0cb56596 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java +++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java @@ -855,6 +855,11 @@ public class VmwareStorageProcessor implements StorageProcessor { s_logger.info("vmdkfile parent dir: " + snapshotRoot); File snapshotdir = new File(snapshotRoot); File[] ssfiles = snapshotdir.listFiles(); + if (ssfiles == null) { + String msg = "unable to find snapshot vmdk files in " + snapshotRoot; + s_logger.error(msg); + throw new Exception(msg); + } // List filenames = new ArrayList(); for (int i = 0; i < ssfiles.length; i++) { String vmdkfile = ssfiles[i].getName();