CLOUDSTACK-6968: Allowing cluster scope volumes to attach to any VM. If migration is

needed then first they will be migrated to appropriate cluster before attaching.

(cherry picked from commit e7ba46b5f7)
This commit is contained in:
Anshul Gangwar 2014-06-20 16:35:06 +05:30 committed by Daan Hoogland
parent 423c23af40
commit 1b1a417bb4
1 changed files with 3 additions and 1 deletions

View File

@ -1944,7 +1944,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
}
if (storeForDataStoreScope.getScopeId().equals(vmClusterId)) {
return false;
}
} else {
return true;
}
} else if (storeForDataStoreScope.getScopeType() == ScopeType.HOST
&& (storeForRootStoreScope.getScopeType() == ScopeType.CLUSTER || storeForRootStoreScope.getScopeType() == ScopeType.ZONE)) {
Long hostId = _vmInstanceDao.findById(rootVolumeOfVm.getInstanceId()).getHostId();