Maor Lipchuk has posted comments on this change.
Change subject: core: restore memory from snapshot on run vm
......................................................................
Patch Set 14: Looks good to me, but someone else must approve
(2 inline comments)
minor comments inline
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
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);
You can use getDbFacade() instead of DbFacade.getInstance()
Line 457:
vmToBeCreated.setHibernationVolHandle(activeSnapshotOfVmToBeCreated.getMemoryVolume());
Line 458: CreateVmVDSCommandParameters parameters =
Line 459: new CreateVmVDSCommandParameters(getVdsId(),
vmToBeCreated);
Line 460: parameters.setClearHibernationVolumes(true);
Line 456:
DbFacade.getInstance().getSnapshotDao().get(vmToBeCreated.getId(),
SnapshotType.ACTIVE);
Line 457:
vmToBeCreated.setHibernationVolHandle(activeSnapshotOfVmToBeCreated.getMemoryVolume());
Line 458: CreateVmVDSCommandParameters parameters =
Line 459: new CreateVmVDSCommandParameters(getVdsId(),
vmToBeCreated);
Line 460: parameters.setClearHibernationVolumes(true);
Don't you prefer to set the vm hibernateVolume to empty string instead adding a
new parameter?
Line 461: return parameters;
Line 462: }
Line 463: return new CreateVmVDSCommandParameters(getVdsId(),
vmToBeCreated);
Line 464: }
--
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: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches