From d59358dd0994fd125b8667275acca3ec39188dd6 Mon Sep 17 00:00:00 2001 From: abhishek Date: Fri, 14 Jan 2011 17:41:48 -0800 Subject: [PATCH] merging 8016 into master --- server/src/com/cloud/vm/UserVmManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 261309fe627..18aa5b63469 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -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());