Commit fc31fadd authored by Iustin Pop's avatar Iustin Pop
Browse files

Restrict blacklisted OSes in instance installation

Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 546b1111
......@@ -6636,6 +6636,10 @@ class LUCreateInstance(LogicalUnit):
if self.op.os_type is None:
raise errors.OpPrereqError("No guest OS specified",
if self.op.os_type in self.cfg.GetClusterInfo().blacklisted_oss:
raise errors.OpPrereqError("Guest OS '%s' is not allowed for"
" installation" % self.op.os_type,
if self.op.disk_template is None:
raise errors.OpPrereqError("No disk template specified",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment