From 8d0bea994dcd74cd6707b58ac2e4060a93f52d96 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 40725314f46..a53e38072ff 100755 --- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -866,6 +866,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; }