Bug 2081556 - [admin portal] Unable to clone vm from snapshot if VM has preallocated COW disk (incremental)
Summary: [admin portal] Unable to clone vm from snapshot if VM has preallocated COW di...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.5.1.1
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-4.5.1
: ---
Assignee: shani
QA Contact: shani
URL:
Whiteboard:
Depends On: 2081554
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-04 00:05 UTC by Germano Veit Michel
Modified: 2022-06-23 05:57 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-4.5.1.2
Doc Type: Bug Fix
Doc Text:
Previously, an attempt to clone a virtual machine from a snapshot of a virtual machine that has a preallocated disk with incremental-backup enabled lead to an error about incorrect configuration. Now, the incremental-backup property is preserved and thus the combination of QCOW format and preallocated type is accepted and the error no longer appears
Clone Of:
Environment:
Last Closed: 2022-06-21 07:57:08 UTC
oVirt Team: Storage
Embargoed:
pm-rhel: ovirt-4.5?
pm-rhel: devel_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 401 0 None open core: write the backup type on OVF configuration 2022-05-29 14:07:13 UTC
Red Hat Issue Tracker RHV-45931 0 None None None 2022-05-04 00:08:27 UTC

Description Germano Veit Michel 2022-05-04 00:05:48 UTC
Description of problem:

It is not possible to clone a VM from snapshot if the VM has preallocated COW disks (for incremental backup)

Version-Release number of selected component (if applicable):
rhvm-4.4.10.7-0.4.el8ev.noarch
vdsm-4.40.100.2-1.el8ev.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Create a VM, with no disks

2. Virtual Machines -> VM -> Disks -> New
   Set the disk to preallocated and enable incremental:
     Allocation Policy: PREALLOCATED
     [x] Enable Incremental Backup
     Size: 100G

3. Click OK

4. Now we create a snapshot of the VM

5. Try to clone from the snapshot.
   Compute -> Virtual Machines -> VM -> Snapshots -> SNAP -> Clone
      Resource Allocation -> Disk Allocation -> Preallocated (just check, its the only option available)

Result:

2022-05-03 19:57:04,223-04 WARN  [org.ovirt.engine.core.bll.AddVmFromSnapshotCommand] (default task-8) [] Validation of action 'AddVmFromSnapshot' failed for user admin@internal-authz. Reasons: VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_DISK_CONFIGURATION_NOT_SUPPORTED,$volumeFormat COW,$volumeType Preallocated,$backup None

This hits the same issue that BZ2081554 is hitting, but the UI should have:
a) An option to enable/disable incremental when cloning
b) Ensure it reads the incremental property of the existing disk, and sends the right request to the backend, so it does not deny it.

Please use this to track that it works both via API and via UI.

Comment 1 Arik 2022-05-24 13:06:52 UTC
Similar to bz 2046689, it is important in order to be persisted with the incremental backup setting

Comment 2 shani 2022-05-29 13:18:19 UTC
This one seems to be related to the OVF configuration when creating the VM from a snapshot.
It seems that the backup value wasn't written as part of the OVF configuration, so loading it on AddVmFromSnapshotCommand ignores the backup type and effect the disk on the newly created VM.

On bz 2046689, the issue is setting the backup:incremental flag while creating a VM based on a template.
Since the value wasn't set as part of the parameters, it was missing from the final resulted VM.

Those two have separate fixes and don't seem to depend on each other.

Comment 3 Arik 2022-05-31 07:05:40 UTC
(In reply to shani from comment #2)
> Those two have separate fixes and don't seem to depend on each other.

Yeah, it was expected that the fixes would be different and thus we kept those bugs separate without a depends-on/blocks/duplicate relationship so that's ok
Comment 1 meant to say that they are both similar since, as you wrote in comment 2, both bugs result from not setting the source with the incremental-backup property and therefore the disk that is created is not set with that as well

Comment 5 Arik 2022-06-19 16:37:01 UTC
yes, the inability to clone a VM from snapshot in that case is not that severe but the inability to keep the 'incremental backup' property is significant

Comment 6 Avihai 2022-06-20 10:42:07 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 8 Avihai 2022-06-20 13:52:45 UTC
Hi Germano,
To try and understand how much this bug is important/significant/severe:

Is there a customer request or a customer waiting for this bug resolution? (I do not see a customer case link)

How did you get to that scenario in the first place? something customer-related?
How much does customers use the clone from snapshot feature for backup/something-else?

Comment 9 Arik 2022-06-20 14:48:58 UTC
Shani, can you please make sure the original flow in the description is fixed?

Comment 10 Germano Veit Michel 2022-06-20 21:13:19 UTC
(In reply to Avihai from comment #8)
> Hi Germano,
> To try and understand how much this bug is important/significant/severe:
> 
> Is there a customer request or a customer waiting for this bug resolution?
> (I do not see a customer case link)

Nope, just me playing with it.

> How did you get to that scenario in the first place? something
> customer-related?

Trying to reproduce something else, which was not this :)
Feel free to move to oVirt.

> How much does customers use the clone from snapshot feature for
> backup/something-else?

Not much.

Comment 12 shani 2022-06-21 07:54:57 UTC
(In reply to Arik from comment #9)
> Shani, can you please make sure the original flow in the description is
> fixed?

Verified the scenario on the description:
https://imgur.com/a/WBMNi8N

VM was cloned from a snapshot, the operation succeeded:
│2022-06-21 10:47:12,893+03 INFO  [org.ovirt.engine.core.bll.AddVmFromSnapshotCommand] (EE-ManagedThreadFactory-engine-Thread-83) [ac1edadc-86d4-4425-a0b0-2f947712df16] Ending command 'org.ovirt.engine.core.bll.AddVmFromSnapshotCommand' successfully.

And the new VM's disk is preallocated + incremental backup

Comment 13 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.


Note You need to log in before you can comment on or make changes to this bug.