mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6170
This commit is contained in:
parent
ded7e682dc
commit
cb26b4c337
@ -34,7 +34,6 @@ import com.cloud.host.HostVO;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.storage.GuestOSVO;
|
||||
import com.cloud.storage.Volume;
|
||||
import com.cloud.storage.VolumeVO;
|
||||
import com.cloud.storage.dao.GuestOSDao;
|
||||
import com.cloud.storage.dao.VolumeDao;
|
||||
@ -103,9 +102,10 @@ public class XenServerGuru extends HypervisorGuruBase implements HypervisorGuru
|
||||
|
||||
List<VolumeVO> volumes = _volumeDao.findByInstance(vm.getId());
|
||||
|
||||
// it's OK in this case to send a detach command to the host for a root volume as this
|
||||
// will simply lead to the SR that supports the root volume being removed
|
||||
if (volumes != null) {
|
||||
for (VolumeVO volume : volumes) {
|
||||
if (volume.getVolumeType() == Volume.Type.DATADISK) {
|
||||
StoragePoolVO storagePool = _storagePoolDao.findById(volume.getPoolId());
|
||||
|
||||
// storagePool should be null if we are expunging a volume that was never
|
||||
@ -129,7 +129,6 @@ public class XenServerGuru extends HypervisorGuruBase implements HypervisorGuru
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return commands;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user