Description of problem: If a VM that is not running is exported to a data domain; 1) a snapshot is unnecessarily created, "Auto-generated for Clone Live VM" 2) the snapshot is not removed Version-Release number of selected component (if applicable): RHVM 4.4.5 How reproducible: 100% Steps to Reproduce: 1. Export a VM that is down to a data domain 2. Check snapshot in GUI or database Actual results: Expected results: Additional info:
Created attachment 1786916 [details] triggering export twice triggering export twice
Created attachment 1786917 [details] All snapshots are removed All snapshots are removed
Let me elaborate on that - We indeed create a snapshot also when the VM is down. It may seem redundant but the idea behind this is that this way the clone-VM operation doesn't operate on the active volume(s) but rather on a snapshot. This allows us to do things like running the VM while it is cloned. So we create the snapshot by design during clone-VM even when the VM is down and export to data domain appears to use clone-VM - that explains why the snapshot is created also in this case. I think that it makes sense to create the snapshot also in case of export to data domain for the same reason, but I'll let the storage team to decide on that - thus moving this bz back to the storage team. As for the inability to remove the snapshot - I didn't manage to reproduce it. I exported a VM twice to a data domain and afterwards the auto-generated snapshots were removed (see the attached screenshots). We also didn't get any report about this problem for clone VM (note that it may take some time for the snapshot to be removes as the cloning needs to finish, the engine needs to detect it and only then removes the snapshot). If there're logs that cover the failure to remove the snapshot, please share them.
I agree that using the clone VM flow and creating a snapshot is good behaviour also for export VM. Regards to the snapshot removal, Gordon can you reproduce this issue?
BTW, posted https://gerrit.ovirt.org/#/c/ovirt-engine/+/114959 to change the description of the snapshot from "Auto-generated for Clone Live VM" to "Auto-generated for Clone VM"
Mark, please fill the "Doc Text" field
Verified successfully. Versions: vdsm-4.50.0.7-1.el8ev ovirt-engine-vdsm-4.50.0.7-1.el8ev Steps to reproduce: Check for two cases: VM with existing snapshot, VM without any snapshots 1. Export VM to Storage Domain, "Collapse snapshots" unchecked. 2. Verify that the target VM does not have an "Auto-generated" snapshot, but only the same snapshots that the source VM has Actual results: As expected - After the VM was exported to data SD, the source VM didn't have any generated snapshot and both VMs(source and exported) could run without any issues. Could reproduce it on the previous version before the fix (ovirt-engine-vdsm-4.4.10-6) and on the latest version it doesn't reproduce anymore.
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.0 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.