Fix NPE when reboot vm

vm.podId has different meaning than you think
This commit is contained in:
Frank 2011-06-01 11:54:20 -07:00
parent d9b61f26da
commit 9961e1ca2a
1 changed files with 1 additions and 1 deletions

View File

@ -1319,12 +1319,12 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
T rebootedVm = null;
DataCenter dc = _configMgr.getZone(vm.getDataCenterId());
HostPodVO pod = _configMgr.getPod(vm.getPodId());
Host host = _hostDao.findById(vm.getHostId());
Cluster cluster = null;
if (host != null) {
cluster = _configMgr.getCluster(host.getClusterId());
}
HostPodVO pod = _configMgr.getPod(host.getPodId());
DeployDestination dest = new DeployDestination(dc, pod, cluster, host);
try {