mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Bring back vm.suspend during deleting VM snapshot (#4029)
This commit is contained in:
parent
208e185714
commit
b406e1dc46
@ -1005,6 +1005,13 @@ public class KVMStorageProcessor implements StorageProcessor {
|
||||
primaryStore.getUuid());
|
||||
if (state == DomainInfo.DomainState.VIR_DOMAIN_RUNNING && !primaryStorage.isExternalSnapshot()) {
|
||||
final DomainSnapshot snap = vm.snapshotLookupByName(snapshotName);
|
||||
try {
|
||||
s_logger.info(String.format("Suspending VM '%s' to delete snapshot,", vm.getName()));
|
||||
vm.suspend();
|
||||
} catch (final LibvirtException e) {
|
||||
s_logger.error("Failed to suspend the VM", e);
|
||||
throw e;
|
||||
}
|
||||
snap.delete(0);
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user