merging 8016 into master

This commit is contained in:
abhishek 2011-01-14 17:41:48 -08:00
parent cfe1d99701
commit d59358dd09
1 changed files with 5 additions and 0 deletions

View File

@ -2150,6 +2150,11 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
if (template == null || template.getRemoved() != null) {
throw new InvalidParameterValueException("Unable to use template " + cmd.getTemplateId());
}
if (template.getTemplateType().equals(TemplateType.SYSTEM)) {
throw new InvalidParameterValueException("Unable to use system template " + cmd.getTemplateId()+" to deploy a user vm");
}
boolean isIso = Storage.ImageFormat.ISO == template.getFormat();
if (isIso && !template.isBootable()) {
throw new InvalidParameterValueException("Installing from ISO requires an ISO that is bootable: " + template.getId());