mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3759 [Automation] Failed to attach volume to VM, while vm are in stopped state Fix the null pointer.
Signed-off-by: Edison Su <sudison@gmail.com>
This commit is contained in:
parent
2e0f11f15f
commit
8f7b90badf
|
|
@ -1543,6 +1543,10 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
|
|||
}
|
||||
|
||||
private boolean needMoveVolume(VolumeVO rootVolumeOfVm, VolumeInfo volume) {
|
||||
if (rootVolumeOfVm.getPoolId() == null || volume.getPoolId() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
DataStore storeForRootVol = dataStoreMgr.getPrimaryDataStore(rootVolumeOfVm.getPoolId());
|
||||
DataStore storeForDataVol = dataStoreMgr.getPrimaryDataStore(volume.getPoolId());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue