storage: allow VM snapshots without memory for KVM when global setting allows#8062
storage: allow VM snapshots without memory for KVM when global setting allows#8062yadvr merged 2 commits intoapache:4.18apache/cloudstack:4.18from shapeblue:vmsnapshot-fix-418shapeblue/cloudstack:vmsnapshot-fix-418Copy head branch name to clipboard
Conversation
…allows This removes the conditional logic where comment notest to remove it after PR apache#5297 is merged that is applicable for ACS 4.18+. Only when the global setting is enabled and memory isn't selected, VM snapshot could be allowed for VMs on KVM that have qemu-guest-agent running. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
|
@blueorangutan package |
|
@harikrishna-patnala a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Also worth checking why this test isn't failing (or even running) - https://github.com/apache/cloudstack/blob/main/test/integration/smoke/test_vm_snapshot_kvm.py#L198 |
|
@blueorangutan package |
|
@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7297 |
Codecov Report
@@ Coverage Diff @@
## 4.18 #8062 +/- ##
============================================
+ Coverage 13.02% 13.06% +0.04%
- Complexity 9032 9108 +76
============================================
Files 2720 2720
Lines 257080 257527 +447
Branches 40088 40153 +65
============================================
+ Hits 33476 33658 +182
- Misses 219400 219639 +239
- Partials 4204 4230 +26
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@blueorangutan test matrix |
|
@rohityadavcloud a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
The proposal LGTM, we would only have to validate why creating volume snapshot from VM snapshot is not working. |
|
[SF] Trillian test result (tid-7900)
|
|
[SF] Trillian test result (tid-7902)
|
|
[SF] Trillian test result (tid-7901)
|
|
code looks ok, but not sure about the consequences.
especially the
@GutoVeronezi , is that pertinent to this change? |
slavkap
left a comment
There was a problem hiding this comment.
Code LGTM, tested take/revert/delete VM snapshot without memory
|
Thanks @slavkap for reviewing and testing @GutoVeronezi thanks, it might be an env issue in my case, welcome any testing/feedback or changes to this PR @DaanHoogland yup, my bad - sentence structure was mixed and made some tyP0$; fixed now :) |
|
I'll go ahead and merge this, and open an issue to track the case of creating (volume) snapshot from VM snapshot issue. |
|
Also @slavkap how do you determine if the Qemu agent is running inside a VM? |
|
Hi @andrijapanicsb, I think @GutoVeronezi probably could help with virsh steps because the NFS/Local storage snapshots come from #5297 From what I got from the code, I think those are the steps for creating a snapshot: The XML file contains this:
Merging the snapshot: About the qemu agent, I've added only this in the docs - Storage-based VM snapshots. There aren't any checks that the qemu-guest-agent for sure works |
|
@slavkap thx for the info - however if the Qemu agent is not installed, the snapshot fails gracefully (tested by Rohit) - so some checks seems to be performed... ? |
|
Yes, the check is only if the guest agent fails to freeze/thaw the VM, but there aren't any special checks if there is an installed guest agent or if it's working. |
…g allows (apache#8062) This removes the conditional logic where comment notest to remove it after PR apache#5297 is merged that is applicable for ACS 4.18+. Only when the global setting is enabled and memory isn't selected, VM snapshot could be allowed for VMs on KVM that have qemu-guest-agent running. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
…g allows (apache#8062) This removes the conditional logic where comment notest to remove it after PR apache#5297 is merged that is applicable for ACS 4.18+. Only when the global setting is enabled and memory isn't selected, VM snapshot could be allowed for VMs on KVM that have qemu-guest-agent running. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> (cherry picked from commit 8350ce5) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
…g allows (apache#8062) This removes the conditional logic where comment notest to remove it after PR apache#5297 is merged that is applicable for ACS 4.18+. Only when the global setting is enabled and memory isn't selected, VM snapshot could be allowed for VMs on KVM that have qemu-guest-agent running. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> (cherry picked from commit 8350ce5) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This removes the conditional logic which is recommended in comments to remove it after PR #5297 is merged, and that is certainly applicable for ACS 4.18+. Only when the global setting is enabled and memory isn't selected, VM snapshot could be allowed for VMs on KVM that have qemu-guest-agent running.
Refer:
#3724
#5297
Doc improvement PR - apache/cloudstack-documentation#353
Types of changes
Testing
However, creating (volume) snapshot from VM snapshot somehow failed for me.
Reverting the snapshot also failed as this was a disk-only snapshot and VM was running. After stopping the VM, reverting the disk-only VM snapshot worked for me.