mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix NPE reported on IRC, provide the user an informative error message
This commit is contained in:
parent
4523490d44
commit
1d2124dcbf
@ -268,6 +268,9 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
|||||||
Pair<String, String> templateInfo = VmwareStorageLayoutHelper.decodeTemplateRelativePathAndNameFromUrl(secondaryStorageUrl, templateUrl, template.getName());
|
Pair<String, String> templateInfo = VmwareStorageLayoutHelper.decodeTemplateRelativePathAndNameFromUrl(secondaryStorageUrl, templateUrl, template.getName());
|
||||||
|
|
||||||
VmwareContext context = hostService.getServiceContext(cmd);
|
VmwareContext context = hostService.getServiceContext(cmd);
|
||||||
|
if (context == null) {
|
||||||
|
return new CopyCmdAnswer("Failed to create a Vmware context, check the management server logs or the ssvm log for details");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);
|
VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user