mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7265: For LXC volumes, show unsupported operation error for volume snapshot
This commit is contained in:
parent
d6fdb7c6bc
commit
99010f463b
|
|
@ -1954,6 +1954,10 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
|||
throw new InvalidParameterValueException("VolumeId: " + volumeId + " is not in " + Volume.State.Ready + " state but " + volume.getState() + ". Cannot take snapshot.");
|
||||
}
|
||||
|
||||
if (ImageFormat.DIR.equals(volume.getFormat())){
|
||||
throw new InvalidParameterValueException("Snapshot not supported for volume:" + volumeId);
|
||||
}
|
||||
|
||||
if (volume.getTemplateId() != null) {
|
||||
VMTemplateVO template = _templateDao.findById(volume.getTemplateId());
|
||||
if (template != null && template.getTemplateType() == Storage.TemplateType.SYSTEM) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue