diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmCommand.java index 16318209cdc..beb5de45743 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmCommand.java @@ -276,7 +276,7 @@ private void cloneVm() { protected void createDestSnapshots() { } - private void removeVmSnapshot() { + protected void removeVmSnapshot() { unlockEntities(); ActionReturnValue returnValue = runInternalAction( diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmNoCollapseCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmNoCollapseCommand.java index 57fc37234c0..2a0401ff371 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmNoCollapseCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CloneVmNoCollapseCommand.java @@ -79,6 +79,12 @@ protected boolean validate() { return super.validate(); } + @Override + protected void executeVmCommand() { + getParameters().setStage(CloneVmParameters.CloneVmStage.CREATE_VM_SNAPSHOT); + setSucceeded(true); + } + @Override protected void addVmImages() { getParameters() @@ -236,6 +242,12 @@ private List prepareImageChainMap(DiskImage diskImage, Guid destImage return newChain; } + @Override + protected void removeVmSnapshot() { + log.info("Skipping Auto-Generated snapshot removal, since it was not generated for " + + "exporting VM '{}' without collapsing snapshots", getSourceVmId()); + } + @Override protected void unlockEntities() { TransactionSupport.executeInNewTransaction(() -> {