Skip to content

Commit dac66d7

Browse files
author
Jessica Wang
committed
CLOUDSTACK-4428: UI > volume > when hypervisor is KVM and kvm.snapshot.enabled configuration is false, still show Take Snapshot option if VM State is Stopped.
1 parent 96a17cc commit dac66d7

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎ui/scripts/storage.js‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,13 +1864,21 @@
18641864
return ["remove"];
18651865
}
18661866

1867-
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
1868-
if(jsonObj.hypervisor != 'KVM'
1869-
|| (jsonObj.hypervisor == 'KVM' && g_KVMsnapshotenabled == true) ) {
1870-
allowedActions.push("takeSnapshot");
1867+
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
1868+
if (jsonObj.hypervisor == 'KVM') {
1869+
if (g_KVMsnapshotenabled == true) {
1870+
allowedActions.push("takeSnapshot");
1871+
allowedActions.push("recurringSnapshot");
1872+
} else {
1873+
if(jsonObj.vmstate == 'Stopped') {
1874+
allowedActions.push("takeSnapshot");
1875+
}
1876+
}
1877+
} else {
1878+
allowedActions.push("takeSnapshot");
18711879
allowedActions.push("recurringSnapshot");
1872-
}
1873-
1880+
}
1881+
18741882
if (jsonObj.type == "DATADISK") {
18751883
allowedActions.push("resize");
18761884
}

0 commit comments

Comments
 (0)