Vered Volansky has posted comments on this change. Change subject: core: restore memory from snapshot on run vm ......................................................................
Patch Set 13: (3 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java Line 445: return vmStatus; Line 446: } Line 447: Line 448: /** Line 449: * Initial the parameters for the VDSM command of VM creation s/Initial/Initialize, while you're at it... Line 450: * @return the VDS create VM parameters Line 451: */ Line 452: protected CreateVmVDSCommandParameters initVdsCreateVmParams() { Line 453: VM vmToBeCreated = getVm(); Line 454: if (vmToBeCreated.getStatus() != VMStatus.Suspended) { Line 455: Snapshot activeSnapshotOfVmToBeCreated = Line 456: DbFacade.getInstance().getSnapshotDao().get(vmToBeCreated.getId(), SnapshotType.ACTIVE); Line 457: vmToBeCreated.setHibernationVolHandle(activeSnapshotOfVmToBeCreated.getMemoryVolume()); Line 458: CreateVmVDSCommandParameters parameters = Define parameters before if, do what you already do in if except returnning from it, and return parameters either way after if. Line 459: new CreateVmVDSCommandParameters(getVdsId(), vmToBeCreated); Line 460: parameters.setClearHibernationVolumes(true); Line 461: return parameters; Line 462: } .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/CreateVmVDSCommandParameters.java Line 5: import org.ovirt.engine.core.compat.Guid; Line 6: Line 7: public class CreateVmVDSCommandParameters extends VdsAndVmIDVDSParametersBase { Line 8: Line 9: private VM vm; Much better! Line 10: private SysPrepParams sysPrepParams; Line 11: private boolean clearHibernationVolumes; Line 12: Line 13: public CreateVmVDSCommandParameters() { -- To view, visit http://gerrit.ovirt.org/14860 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id382ff479827af96fc529b57ec0ea1b0b7d21818 Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches