After cluster version change, VM snapshot in preview shall have Custom compatibility version temporarily set to the original cluster version it was taken in. Temporarily set custom compatibility version is implemented by #1356027 (or 61079 gerrit). Such a VM has custom compatibility version set until power off. The UpdateVmCommand will be called on these previewed snapshots. Snapshots with RAM originating in previous cluster version will not be blocked from preview.
How is it related to devices?
Not exclusively, but i.e. graphics devices are updated. Actually that was the original reason for calling the UpdateVmCommand within update cluster scenario. I'm changing BZ title to be more accurate.
*** Bug 1360783 has been marked as a duplicate of this bug. ***
The code change is quite risky hitting issues with locking and next run snapshots' editable fields. Due to this risks proposing it for 4.0.4. Restoring a snapshot in 4.0.3 with memory will contain a warning: " The selected snapshot's memory can't be properly restored since it was created in different cluster version. Executing new cluster features can cause failure of the running preview until it's shut down and restarted. Please confirm the memory shall be restored anyway. " and this message is going to be added as part of https://bugzilla.redhat.com/show_bug.cgi?id=1356027 in 4.0.3
Cannot verify, tested with rhevm-4.0.4.1-0.1.el7ev.noarch and rhevm-4.0.4.2-0.1.el7ev.noarch as well. In both cases the following flow produces what seems as the wrong result: 1. In dc-cluster 3.6 create a vm. 2. Start the vm and create a live snapshot with memory. 3. Upgrade the cluster to 4.0 while the vm is still up. After upgrade vm has ccv 3.6. 4. Stop the vm - vm has now ccv 4.0. 5. Preview the snapshot - the warning message mentioned in comment#4 is issues as expected. Check restore memory box and click 'ok'. Result: The vm's snapshot is restored, ccv is still set to 4.0 instead of 3.6. Regardless to that after the vm is running the dom xml of the vm is set as a 3.6 (see dom xml in vdsm.log.1.xz that I will attach) in line with: '14:49:19,937::vm::1963::virt.vm::' Expected: Upon snapshot preview with memory the vm's ccv should be set to 3.6 according to the snapshot.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
let's see what's wrong and then asses whether it is worth a backport to 4.0 The result as described in comment #5 is acceptable as is, it's just the ccv field giving misleading information, but the VM itself runs as it should
I would suggest to backport to 4.0. Without 64129 patch, custom compatibility version is not set on snapshot preview with memory _and disks_ .
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
Cannot verify (sorry), tested with rhevm-4.1.0-0.3.beta2.el7.noarch. The result is kind of a mirror of the problem last time. Steps: 1. In dc-cluster 4.0 create a vm. 2. Start the vm and create a live snapshot with memory. 3. Upgrade the cluster to 4.1 while the vm is still up. After upgrade vm has ccv 4.0. 4. Stop the vm - vm has now ccv 4.1. 5. Preview the snapshot - the warning message mentioned in comment#4 is issues as expected. Check restore memory box and click 'ok'. Result: This time, the vm is previewed and the ccv is set correctly back to 4.0, but this time, when I start the previewed vm, and check it's xml in virsh I see that it's machine type is now 'pc-i440fx-rhel7.3.0' which is the default for 4.1 whereas if it's a 4.0 compatible vm it suppose to have 'pc-i440fx-rhel7.2.0' machine type Expected: Upon snapshot preview with memory the vm's ccv should be set to 4.0 according to the snapshot + vm should start with 4.0 default emulated machine.
this is actually a problem since the original implementation applicable to all VM runs, it should be fixed for all cases at once, changing title
Verified with rhevm-4.1.0.2-0.2.el7.noarch. 1. Created vm in 4.0 dc-cluster. 2. Started the vm and created live snapshot with memory for it. 3. Upgraded the cluster to 4.1 while vm is still up. 4. Stopped vm. 5. Verified ccv changed to 4.1 and started the vm to verify machine type is set correctly to 'pc-i440fx-rhel7.3.0'. 6. Stopped vm. 7. Previewed snapshot with memory. 8. Verified ccv changed back to 4.0 and started the vm to verify machine type was set back to 'pc-i440fx-rhel7.2.0'. 9. Stopped vm. 10. Undo the snapshot preview. 11. Verified ccv changed to 4.1 and started the vm to verify machine type is set correctly to 'pc-i440fx-rhel7.3.0'.
I set RDT to '-' because this limitation is not to be included in release notes. (BZ#1400127)