CLOUDSTACK-7267: For LXC volumes, show unsupported operation error for template creation from ROOT volume

(cherry picked from commit e427d0004c7df501912e0c3f9af2f4f237514454)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Kishan Kavala 2014-10-23 20:30:38 +05:30 committed by Rohit Yadav
parent 4ea0dcda9b
commit 40e296dea4

View File

@ -1537,6 +1537,9 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
}
hyperType = _volumeDao.getHypervisorType(volumeId);
if (HypervisorType.LXC.equals(hyperType)) {
throw new InvalidParameterValueException("Template creation is not supported for LXC volume: " + volumeId);
}
} else { // create template from snapshot
snapshot = _snapshotDao.findById(snapshotId);
if (snapshot == null) {