mirror of https://github.com/apache/cloudstack.git
fix root volume attach
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
b139d3726d
commit
08d2633b34
|
|
@ -1258,8 +1258,7 @@ public class ServerAdapter extends ManagerBase {
|
|||
}
|
||||
}
|
||||
Long deviceId = null;
|
||||
List<VolumeVO> volumes = volumeDao.findUsableVolumesForInstance(vmVo.getId());
|
||||
if (CollectionUtils.isEmpty(volumes)) {
|
||||
if (Volume.Type.ROOT.equals(volumeVO.getVolumeType())) {
|
||||
deviceId = 0L;
|
||||
}
|
||||
Volume volume = volumeApiService.attachVolumeToVM(vmVo.getId(), volumeVO.getId(), deviceId, false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue