Source:
<code>protected void endVmCommand() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { final boolean taskGroupSucceeded = getParameters().getTaskGroupSuccess(); Snapshot createdSnapshot = getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), SnapshotStatus.LOCKED); if (taskGroupSucceeded) { getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK); if (isLiveSnapshotApplicable()) { performLiveSnapshot(createdSnapshot); } else { String memoryVolume = createdSnapshot.getMemoryVolume(); if (!memoryVolume.isEmpty() && getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1) { boolean succeed = removeMemoryVolumes(memoryVolume, getActionType(), false); if (!succeed) { log.errorFormat("Failed to remove unused memory {0} of snapshot {1}", memoryVolume, createdSnapshot.getId()); } } } } else { if (createdSnapshot != null) { revertToActiveSnapshot(createdSnapshot.getId()); String memoryVolume = createdSnapshot.getMemoryVolume(); if (!memoryVolume.isEmpty() && getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1) { boolean succeed = removeMemoryVolumes(memoryVolume, getActionType(), false); if (!succeed) { log.warnFormat("Failed to remove memory {0} of snapshot {1}", memoryVolume, createdSnapshot.getId()); } } } else { <START> log.infoFormat("No snapshot was created for VM {0} which is in LOCKED status", getVmId()); <END> } } incrementVmGeneration(); endActionOnDisks(); setSucceeded(taskGroupSucceeded); getReturnValue().setEndActionTryAgain(false); return null; } }); if (getVm() != null && getVm().isAutoStartup() && isVmDownUnintentionally() && getParameters().getInitialVmStatus() != VMStatus.Down) { Backend.getInstance().runInternalAction(VdcActionType.RunVm, new RunVmParams(getVmId()), ExecutionHandler.createInternalJobContext()); } }</code><technical_language>I change this warn error. warn is more suitable</technical_language>

Target:
protected void endVmCommand() { TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { final boolean taskGroupSucceeded = getParameters().getTaskGroupSuccess(); Snapshot createdSnapshot = getSnapshotDao().get(getVmId(), getParameters().getSnapshotType(), SnapshotStatus.LOCKED); if (taskGroupSucceeded) { getSnapshotDao().updateStatus(createdSnapshot.getId(), SnapshotStatus.OK); if (isLiveSnapshotApplicable()) { performLiveSnapshot(createdSnapshot); } else { String memoryVolume = createdSnapshot.getMemoryVolume(); if (!memoryVolume.isEmpty() && getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1) { boolean succeed = removeMemoryVolumes(memoryVolume, getActionType(), false); if (!succeed) { log.errorFormat("Failed to remove unused memory {0} of snapshot {1}", memoryVolume, createdSnapshot.getId()); } } } } else { if (createdSnapshot != null) { revertToActiveSnapshot(createdSnapshot.getId()); String memoryVolume = createdSnapshot.getMemoryVolume(); if (!memoryVolume.isEmpty() && getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1) { boolean succeed = removeMemoryVolumes(memoryVolume, getActionType(), false); if (!succeed) { log.warnFormat("Failed to remove memory {0} of snapshot {1}", memoryVolume, createdSnapshot.getId()); } } } else { log.warnFormat("No snapshot was created for VM {0} which is in LOCKED status", getVmId()); } } incrementVmGeneration(); endActionOnDisks(); setSucceeded(taskGroupSucceeded); getReturnValue().setEndActionTryAgain(false); return null; } }); if (getVm() != null && getVm().isAutoStartup() && isVmDownUnintentionally() && getParameters().getInitialVmStatus() != VMStatus.Down) { Backend.getInstance().runInternalAction(VdcActionType.RunVm, new RunVmParams(getVmId()), ExecutionHandler.createInternalJobContext()); } }