diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 7b15f6aa399..a33a764782f 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1273,7 +1273,7 @@ allowedActions.push("createTemplate"); } } - else { + else { //jsonObj.type == "DATADISK" if (jsonObj.virtualmachineid != null) { if (jsonObj.storagetype == "shared" && (jsonObj.vmstate == "Running" || jsonObj.vmstate == "Stopped" || jsonObj.vmstate == "Destroyed")) { allowedActions.push("detachDisk"); @@ -1281,7 +1281,7 @@ } else { // Disk not attached allowedActions.push("remove"); - if(isAdmin()) { + if(jsonObj.state == "Ready" && isAdmin()) { allowedActions.push("migrateToAnotherStorage"); } if (jsonObj.storagetype == "shared") {