fix bug beforeStartVmOnKvm
@@ -334,9 +334,11 @@ public class CephPrimaryStorageFactory implements PrimaryStorageFactory, CephCap
cmd.setBootIso(convertIsoToCephIfNeeded(cmd.getBootIso()));
CephPrimaryStorageVO cephPrimaryStorageVO = dbf.findByUuid(spec.getDestRootVolume().getPrimaryStorageUuid(), CephPrimaryStorageVO.class);
+ if(cephPrimaryStorageVO != null){
cmd.getAddons().put(CephConstants.CEPH_SCECRET_KEY, cephPrimaryStorageVO.getUserKey());
cmd.getAddons().put(CephConstants.CEPH_SECRECT_UUID, CephSystemTags.KVM_SECRET_UUID.getTokenByResourceUuid(cephPrimaryStorageVO.getUuid(), CephSystemTags.KVM_SECRET_UUID_TOKEN));
}
+ }
@Override
public void startVmOnKvmSuccess(KVMHostInventory host, VmInstanceSpec spec) {
