diff --git a/server/src/main/java/com/cloud/template/TemplateManagerImpl.java b/server/src/main/java/com/cloud/template/TemplateManagerImpl.java index 194d97349f01..8ac44c996a8a 100755 --- a/server/src/main/java/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/main/java/com/cloud/template/TemplateManagerImpl.java @@ -476,7 +476,8 @@ public DataStore getImageStore(String storeUuid, Long zoneId, VolumeVO volume) { } if (imageStore == null) { - throw new CloudRuntimeException(String.format("Cannot find an image store for zone [%s].", zoneId)); + logger.error("Cannot find an image store for zone [{}].", zoneId); + throw new CloudRuntimeException("Failed to create template. Please contact the cloud administrator."); } return imageStore; @@ -1702,7 +1703,8 @@ public VirtualMachineTemplate createPrivateTemplate(CreateTemplateCmd command) t } DataStore store = _dataStoreMgr.getImageStoreWithFreeCapacity(zoneId); if (store == null) { - throw new CloudRuntimeException("cannot find an image store for zone " + zoneId); + logger.error("Cannot find an image store for zone [{}].", zoneId); + throw new CloudRuntimeException("Failed to create template. Please contact the cloud administrator."); } AsyncCallFuture future = null;