From 1718bb38aa2c953f8a0175def29ec616122904d9 Mon Sep 17 00:00:00 2001 From: Bharat Kumar Date: Thu, 2 Apr 2015 15:31:36 +0530 Subject: [PATCH] CLOUDSTACK-8860: improve error messages in VM deployment code path. Conflicts: engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java --- .../api/command/user/vm/DeployVMCmd.java | 4 ++-- .../com/cloud/vm/VirtualMachineManagerImpl.java | 15 ++++++++------- server/src/com/cloud/vm/UserVmManagerImpl.java | 15 ++++++--------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java index 77b10ec0684d..cd949cd7faf7 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -474,7 +474,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy vm uuid:"+getEntityUuid()); } } @@ -556,7 +556,7 @@ public void create() throws ResourceAllocationException { VirtualMachineTemplate template = _entityMgr.findById(VirtualMachineTemplate.class, templateId); // Make sure a valid template ID was specified if (template == null) { - throw new InvalidParameterValueException("Unable to use template " + templateId); + throw new InvalidParameterValueException("Unable to find the template " + templateId); } DiskOffering diskOffering = null; diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index 9dea90a41d15..d87150d3ea57 100644 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -985,7 +985,7 @@ public void orchestrateStart(final String vmUuid, final Map