From f0f7b252ea1c2a29db726c36add0af885d615681 Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Wed, 17 Apr 2013 13:10:29 -0600 Subject: [PATCH] CLOUDSTACK-2071 - VirtualMachineManagerImpl.java start() method for instance can fail to start a VM without notifying caller, if no exception is triggered. The result is that VM start looks successful but was not. This fixes it by throwing an exception at the very end if the object to be passed back is still null. Signed-off-by: Marcus Sorensen 1366225829 -0600 --- server/src/com/cloud/vm/VirtualMachineManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java index 47ed6220a45..2c2986f52ef 100755 --- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -864,6 +864,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac } } + if (startedVm == null) { + throw new CloudRuntimeException("Unable to start instance '" + vm.getHostName() + + "' (" + vm.getUuid() + "), see management server log for details"); + } + return startedVm; }