From 4c35ece9132b171afd7db10e342ae5e41474bee2 Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Wed, 17 Aug 2011 19:15:30 +0530 Subject: [PATCH] fixed execptions while adding second host --- server/src/com/cloud/vm/VirtualMachineManagerImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java index b5aa27c8648..99e272a9eba 100755 --- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1726,12 +1726,12 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene continue; } hId = host.getId(); - } - HypervisorGuru hvGuru = _hvGuruMgr.getGuru(castedVm.getHypervisorType()); + HypervisorGuru hvGuru = _hvGuruMgr.getGuru(castedVm.getHypervisorType()); - Command command = compareState(hId, castedVm, info, true, hvGuru.trackVmHostChange()); - if (command != null) { - commands.addCommand(command); + Command command = compareState(hId, castedVm, info, true, hvGuru.trackVmHostChange()); + if (command != null) { + commands.addCommand(command); + } } } for (final AgentVmInfo left : infos.values()) {