You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2020/04/14 19:01:10 UTC
[cloudstack] branch kvm-vm-suspend-before-delete-vm-snapshot
created (now ef58e56)
This is an automated email from the ASF dual-hosted git repository.
andrijapanic pushed a change to branch kvm-vm-suspend-before-delete-vm-snapshot
in repository https://gitbox.apache.org/repos/asf/cloudstack.git.
at ef58e56 Bring back vm.suspend during deleting VM snapshot
This branch includes the following new commits:
new ef58e56 Bring back vm.suspend during deleting VM snapshot
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[cloudstack] 01/01: Bring back vm.suspend during deleting VM
snapshot
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
andrijapanic pushed a commit to branch kvm-vm-suspend-before-delete-vm-snapshot
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit ef58e564533e14f3f2dd2ed6aaa3bf8072011823
Author: Andrija Panic <45...@users.noreply.github.com>
AuthorDate: Tue Apr 14 21:00:48 2020 +0200
Bring back vm.suspend during deleting VM snapshot
---
.../java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
index 9e1ff71..68e8713 100644
--- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
+++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
@@ -1005,6 +1005,12 @@ public class KVMStorageProcessor implements StorageProcessor {
primaryStore.getUuid());
if (state == DomainInfo.DomainState.VIR_DOMAIN_RUNNING && !primaryStorage.isExternalSnapshot()) {
final DomainSnapshot snap = vm.snapshotLookupByName(snapshotName);
+ try {
+ vm.suspend();
+ } catch(final Exception e) {
+ s_logger.debug("Failed to suspend the VM: " + e);
+ throw e;
+ }
snap.delete(0);
/*