mirror of
https://github.com/apache/cloudstack
synced 2026-08-25 23:56:52 +00:00
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
1658a5a46d
commit
1294a13f43
@ -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
Block a user