Skip to content

Commit

Permalink
fix #779: propagate backup mode to template disks
Browse files Browse the repository at this point in the history
Previously, all template disks were created with backup mode = NONE
regardless of the backup mode of the disks of the VM that the template
is created from.

Now the backup mode would propagate from the VM disks to the template
disks when their format is qcow2. If the template disks are created
as raw their backup mode would be NONE. Enabing to create template
disks with incremental backup enabled from VM disks that are raw is
outside of the scope of this change.

Signed-off-by: Arik Hadas <ahadas@redhat.com>
  • Loading branch information
ahadas committed Dec 15, 2022
1 parent 590a14a commit ced342b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ protected void executeCommand() {
getParameters().getStorageDomainId(),
getParameters().getDestinationStorageDomainId()));

if (targetFormat == VolumeFormat.COW) {
newImage.setBackup(getDiskImage().getBackup());
}
newImage.setId(destinationImageGroupID);
newImage.setDiskDescription(getParameters().getDescription() != null ?
getParameters().getDescription() : getDiskImage().getDiskDescription());
Expand Down

0 comments on commit ced342b

Please sign in to comment.