Arik Hadas has uploaded a new change for review. Change subject: core: always allow to resume hibernated vm ......................................................................
core: always allow to resume hibernated vm Recent changes prevent us from resuming hibernated VM on cluster architecture that does not support snapshots with memory or with compatibility level that does not support snapshots with memory. This patch fix it. Change-Id: I8a1c449e52e74e0d567a7d2bfe7c6c22d328fae4 Signed-off-by: Arik Hadas <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/64/37064/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java index 93570e9..1298e69 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java @@ -138,11 +138,16 @@ return getVm().getDedicatedVmForVds(); } - private String getMemoryFromSnapshot() { + private String getMemoryFromActiveSnapshot() { // If the memory from the snapshot could have been restored already, the disks might be // non coherent with the memory, thus we don't want to try to restore the memory again if (memoryFromSnapshotUsed) { return StringUtils.EMPTY; + } + + if (getFlow() == RunVmFlow.RESUME_HIBERNATE) { + cachedMemoryVolumeFromSnapshot = getActiveSnapshot().getMemoryVolume(); + return cachedMemoryVolumeFromSnapshot; } if (cachedMemoryVolumeFromSnapshot == null) { @@ -698,7 +703,7 @@ getVdsGroup().getEmulatedMachine())); } - getVm().setHibernationVolHandle(getMemoryFromSnapshot()); + getVm().setHibernationVolHandle(getMemoryFromActiveSnapshot()); } protected boolean isPayloadExists(VmDeviceType deviceType) { -- To view, visit http://gerrit.ovirt.org/37064 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a1c449e52e74e0d567a7d2bfe7c6c22d328fae4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
