Bug 2046689

Summary: Creating a VM from Template (clone) does not copy/unable to set backup property
Product: [oVirt] ovirt-engine Reporter: Jean-Louis Dupond <jean-louis>
Component: BLL.StorageAssignee: shani <sleviim>
Status: CLOSED CURRENTRELEASE QA Contact: shani <sleviim>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.9.5CC: ahadas, bugs, dfodor, gveitmic, mperina, nsoffer, sfishbai
Target Milestone: ovirt-4.5.1Keywords: EasyFix
Target Release: ---Flags: pm-rhel: ovirt-4.5?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-20 14:50:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jean-Louis Dupond 2022-01-27 08:59:33 UTC
Description of problem:
When creating an independent/cloned VM from a template. You cannot set the backup_mode to incremental on creation.
Its only possible to set it after creation.


How reproducible:
Always

Steps to Reproduce:
1. Create a VM from a Template
2. On the disk_attachment set disk.backup = virtsdk4.types.DiskBackup.INCREMENTAL


Actual results:
The VM gets created, but its not having incremental mode enabled on the disk


Additional info:
My guess is that the root cause is in the following code:
https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java#L121

Here you see only some parameters are copied/used, the rest is just ignored.
I think we should add all relevant parameters here?

Comment 1 RHEL Program Management 2022-01-27 13:26:31 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 2 Benny Zlotnik 2022-02-08 15:29:08 UTC
Nir, is there any reason not allow this setting or do this differently?

Comment 3 Nir Soffer 2022-02-08 16:36:26 UTC
I think we decided not to persist the backup mode in templates, since it is not
clear that when creating new vm from template you should magically get
backup=incremental from the template.

But when creating a vm from template using the API, when a user specify
backup=incremental, we must respect this value. If we don't respect it, there
is no way to create a new vm using qcow2 preallocated on block storage, or
thin qcow2 on file storage (would become raw-sparse).

Comment 4 Arik 2022-05-09 07:21:32 UTC
*** Bug 2081554 has been marked as a duplicate of this bug. ***

Comment 5 Avihai 2022-06-20 10:42:01 UTC
QE is on a really tight schedule in 4.5.1 with many other bugs to verify, CNACK on capacity from QE side.
As this bug changed severity to high at the last moment(yesterday) and the verification deadline is this week this will be on best effort.

Comment 6 Arik 2022-06-20 14:51:23 UTC
Closed based on DEV verification for the fix

Comment 7 Sandro Bonazzola 2022-06-23 05:57:04 UTC
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.1 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.